diff --git a/build.gradle b/build.gradle.kts similarity index 50% rename from build.gradle rename to build.gradle.kts index cc87290d4..ce7e7a089 100644 --- a/build.gradle +++ b/build.gradle.kts @@ -3,56 +3,55 @@ plugins { id("org.jetbrains.kotlin.jvm").version("1.8.0").apply(false) id("org.jetbrains.kotlin.plugin.allopen").version("1.8.0").apply(false) id("org.jlleitschuh.gradle.ktlint").version("11.1.0").apply(false) - id('org.springframework.boot').version('2.7.8').apply(false) - id('io.spring.dependency-management').version('1.1.0').apply(false) + id("org.springframework.boot").version("2.7.8").apply(false) + id("io.spring.dependency-management").version("1.1.0").apply(false) id("org.sonarqube").version("3.5.0.2730") id("me.champeau.buildscan-recipes").version("0.2.3") id("com.sourcemuse.mongo").version("1.0.7").apply(false) } allprojects { - group = 'com.github.rahulsom' + group = "com.github.rahulsom" } subprojects { repositories { mavenCentral() } - apply plugin: 'checkstyle' + apply(plugin = "checkstyle") - checkstyle { - configFile = rootProject.file('gradle/checkstyle/checkstyle.xml') + configure { + configFile = rootProject.file("gradle/checkstyle/checkstyle.xml") toolVersion = "10.7.0" - showViolations = false maxWarnings = 0 maxErrors = 0 } - def theProject = project - def projectPath = theProject.name + var theProject = project + var projectPath = theProject.name while (theProject.parent != rootProject) { - projectPath = "${theProject.parent.name}-${projectPath}" - theProject = theProject.parent + projectPath = "${theProject.parent!!.name}-${projectPath}" + theProject = theProject.parent!! } sonarqube { properties { - property 'sonar.moduleKey', "com.github.rahulsom:grooves:${projectPath}" + property("sonar.moduleKey", "com.github.rahulsom:grooves:${projectPath}") } } } -contacts { +configure { validateEmails = true - 'rahulsom@noreply.github.com' { + addPerson("rahulsom@noreply.github.com", delegateClosureOf { moniker("Rahul Somasunderam") roles("owner") github("https://github.com/rahulsom") - } + }) } -tasks.getByName('release').dependsOn 'grooves-docs:gitPublishPush' +tasks.named("release") { dependsOn("grooves-docs:gitPublishPush") } buildScanRecipes { - recipes 'git-commit', 'git-status', 'travis-ci', 'gc-stats' + recipes("git-commit", "git-status", "travis-ci", "gc-stats") }