Skip to content

Commit

Permalink
Reformat code to match Kotlin official style
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed May 27, 2024
1 parent 7d208b9 commit af78c7c
Show file tree
Hide file tree
Showing 135 changed files with 3,354 additions and 3,199 deletions.
22 changes: 11 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
plugins {
id("org.metaborg.gradle.config.root-project") version "0.5.6"
id("org.metaborg.gitonium") version "1.2.0"
id("org.metaborg.gradle.config.root-project") version "0.5.6"
id("org.metaborg.gitonium") version "1.2.0"
}

// Auto-accept build scan TOS
extensions.findByName("buildScan")?.withGroovyBuilder {
try {
// New Develocity plugin
setProperty("termsOfUseUrl", "https://gradle.com/help/legal-terms-of-use")
setProperty("termsOfUseAgree", "yes")
} catch (ex: groovy.lang.MissingPropertyException) {
// Deprecated Gradle Enterprise plugin
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}
try {
// New Develocity plugin
setProperty("termsOfUseUrl", "https://gradle.com/help/legal-terms-of-use")
setProperty("termsOfUseAgree", "yes")
} catch (ex: groovy.lang.MissingPropertyException) {
// Deprecated Gradle Enterprise plugin
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}
}
16 changes: 8 additions & 8 deletions core/aterm.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
api("org.metaborg:common")

api("org.metaborg.devenv:org.spoofax.terms")
api("org.metaborg.devenv:org.spoofax.terms")

// Depend on Stratego projects for access to standard library strategies which do aterm pretty printing.
implementation("org.metaborg.devenv:org.spoofax.interpreter.core")
implementation("org.metaborg.devenv:org.strategoxt.strj")
// Depend on Stratego projects for access to standard library strategies which do aterm pretty printing.
implementation("org.metaborg.devenv:org.spoofax.interpreter.core")
implementation("org.metaborg.devenv:org.strategoxt.strj")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.checkerframework:checker-qual-android")
}
28 changes: 14 additions & 14 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
plugins {
id("org.metaborg.gradle.config.root-project") version "0.5.6"
id("org.metaborg.gitonium") version "1.2.0"
id("org.metaborg.gradle.config.root-project") version "0.5.6"
id("org.metaborg.gitonium") version "1.2.0"

// Set versions for plugins to use, only applying them in subprojects (apply false here).
id("org.metaborg.gradle.config.kotlin-gradle-plugin") version "0.5.6" apply false
id("org.metaborg.coronium.bundle") version "0.3.17" apply false
id("biz.aQute.bnd.builder") version "5.3.0" apply false
id("org.jetbrains.intellij") version "1.4.0" apply false
kotlin("jvm") version "1.4.20" apply false // Use 1.4.20 to keep in sync with embedded Kotlin version of Gradle 6.8.
`kotlin-dsl` apply false
// Set versions for plugins to use, only applying them in subprojects (apply false here).
id("org.metaborg.gradle.config.kotlin-gradle-plugin") version "0.5.6" apply false
id("org.metaborg.coronium.bundle") version "0.3.17" apply false
id("biz.aQute.bnd.builder") version "5.3.0" apply false
id("org.jetbrains.intellij") version "1.4.0" apply false
kotlin("jvm") version "1.4.20" apply false // Use 1.4.20 to keep in sync with embedded Kotlin version of Gradle 6.8.
`kotlin-dsl` apply false
}

subprojects {
metaborg {
configureSubProject()
}
metaborg {
configureSubProject()
}
}

val spoofax2Version: String = System.getProperty("spoofax2Version")
val spoofax2DevenvVersion: String = System.getProperty("spoofax2DevenvVersion")
allprojects {
ext["spoofax2Version"] = spoofax2Version
ext["spoofax2DevenvVersion"] = spoofax2DevenvVersion
ext["spoofax2Version"] = spoofax2Version
ext["spoofax2DevenvVersion"] = spoofax2DevenvVersion
}
26 changes: 13 additions & 13 deletions core/constraint.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
api(project(":aterm.common"))
api(project(":jsglr.common"))
api(project(":stratego.common"))
api("org.metaborg:common")
api(project(":aterm.common"))
api(project(":jsglr.common"))
api(project(":stratego.common"))

api("org.metaborg:log.api")
api("org.metaborg:log.api")

implementation("org.metaborg.devenv:nabl2.terms")
implementation("org.metaborg.devenv:org.metaborg.util")
implementation("org.metaborg.devenv:nabl2.terms")
implementation("org.metaborg.devenv:org.metaborg.util")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")
compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")

annotationProcessor("org.derive4j:derive4j")
annotationProcessor("org.derive4j:derive4j")
}
22 changes: 11 additions & 11 deletions core/constraint.pie/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
implementation(project(":aterm.common"))
api(project(":constraint.common"))
api(project(":spoofax.core"))
api("org.metaborg:pie.api")
api("org.metaborg:common")
implementation(project(":aterm.common"))
api(project(":constraint.common"))
api(project(":spoofax.core"))
api("org.metaborg:pie.api")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")
compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")

annotationProcessor("org.derive4j:derive4j")
annotationProcessor("org.derive4j:derive4j")
}
14 changes: 7 additions & 7 deletions core/esv.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
api("org.metaborg:log.api")
api("org.metaborg.devenv:org.spoofax.terms")
implementation("org.metaborg.devenv:org.spoofax.jsglr") // TODO: avoid dependency to jsglr, only need it for imploder attachment.
api("org.metaborg:common")
api("org.metaborg:log.api")
api("org.metaborg.devenv:org.spoofax.terms")
implementation("org.metaborg.devenv:org.spoofax.jsglr") // TODO: avoid dependency to jsglr, only need it for imploder attachment.

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.checkerframework:checker-qual-android")
}
22 changes: 11 additions & 11 deletions core/jsglr.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
api("org.metaborg:common")

api("org.metaborg:resource")
api("org.metaborg.devenv:jsglr.shared")
api("org.metaborg.devenv:org.spoofax.jsglr")
api("org.metaborg.devenv:org.spoofax.terms")
api("org.metaborg:resource")
api("org.metaborg.devenv:jsglr.shared")
api("org.metaborg.devenv:org.spoofax.jsglr")
api("org.metaborg.devenv:org.spoofax.terms")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")
compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")

annotationProcessor("org.derive4j:derive4j")
annotationProcessor("org.derive4j:derive4j")
}
26 changes: 13 additions & 13 deletions core/jsglr.pie/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
implementation(project(":aterm.common"))
api(project(":jsglr.common"))
api(project(":spoofax.core"))
api("org.metaborg:pie.api")
api("org.metaborg:common")
implementation(project(":aterm.common"))
api(project(":jsglr.common"))
api(project(":spoofax.core"))
api("org.metaborg:pie.api")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.immutables:value-annotations")
compileOnly("org.derive4j:derive4j-annotation")
compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.immutables:value-annotations")
compileOnly("org.derive4j:derive4j-annotation")

annotationProcessor("org.immutables:value")
annotationProcessor("org.derive4j:derive4j")
annotationProcessor("org.immutables:value")
annotationProcessor("org.derive4j:derive4j")
}
18 changes: 9 additions & 9 deletions core/jsglr1.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
api(project(":jsglr.common"))
api("org.metaborg.devenv:org.spoofax.jsglr")
api("org.metaborg:common")
api(project(":jsglr.common"))
api("org.metaborg.devenv:org.spoofax.jsglr")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")
compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")

annotationProcessor("org.derive4j:derive4j")
annotationProcessor("org.derive4j:derive4j")
}
18 changes: 9 additions & 9 deletions core/jsglr2.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
api(project(":jsglr.common"))
api("org.metaborg.devenv:org.spoofax.jsglr2")
api("org.metaborg:common")
api(project(":jsglr.common"))
api("org.metaborg.devenv:org.spoofax.jsglr2")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")
compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.derive4j:derive4j-annotation")

annotationProcessor("org.derive4j:derive4j")
annotationProcessor("org.derive4j:derive4j")
}
10 changes: 5 additions & 5 deletions core/nabl2.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))

api("org.metaborg:common")
api("org.metaborg:common")

api("org.metaborg.devenv:nabl2.solver")
api("org.metaborg.devenv:nabl2.solver")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.checkerframework:checker-qual-android")
}
6 changes: 3 additions & 3 deletions core/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
rootProject.name = "spoofax3.core.root"

pluginManagement {
repositories {
maven("https://artifacts.metaborg.org/content/groups/public/")
}
repositories {
maven("https://artifacts.metaborg.org/content/groups/public/")
}
}

include("spoofax.depconstraints")
Expand Down
20 changes: 10 additions & 10 deletions core/spoofax.cli/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))
annotationProcessor(platform(project(":spoofax.depconstraints")))

api("com.google.dagger:dagger")
implementation(project(":spoofax.core"))
api("info.picocli:picocli")
api("com.google.dagger:dagger")
implementation(project(":spoofax.core"))
api("info.picocli:picocli")

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.checkerframework:checker-qual-android")

annotationProcessor("com.google.dagger:dagger-compiler")
annotationProcessor("info.picocli:picocli-codegen")
annotationProcessor("com.google.dagger:dagger-compiler")
annotationProcessor("info.picocli:picocli-codegen")
}

tasks.compileJava {
options.compilerArgs.add("-Aproject=${project.group}/${project.name}")
options.compilerArgs.add("-Aproject=${project.group}/${project.name}")
}
6 changes: 3 additions & 3 deletions core/spoofax.common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id("org.metaborg.gradle.config.java-library")
id("org.metaborg.gradle.config.java-library")
}

dependencies {
api(platform(project(":spoofax.depconstraints")))
api(platform(project(":spoofax.depconstraints")))

compileOnly("org.checkerframework:checker-qual-android")
compileOnly("org.checkerframework:checker-qual-android")
}
Loading

0 comments on commit af78c7c

Please sign in to comment.