diff --git a/.runConfigurations/Run refreshVersions.run.xml b/.runConfigurations/Run refreshVersions.run.xml new file mode 100644 index 0000000..b1f7d9a --- /dev/null +++ b/.runConfigurations/Run refreshVersions.run.xml @@ -0,0 +1,23 @@ + + + + + + + true + true + false + + + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 159d35c..c31cd40 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "1.4.20" - kotlin("kapt") version "1.4.20-RC" + kotlin("jvm") + kotlin("kapt") id("minecraft-data-sources") } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 9fe154b..9fa160d 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,6 +1,6 @@ plugins { `java-gradle-plugin` - kotlin("jvm") version "1.4.20" + kotlin("jvm") } repositories { @@ -8,12 +8,12 @@ repositories { } dependencies { - implementation("org.jetbrains.kotlin:kotlin-reflect:1.4.20") + implementation("org.jetbrains.kotlin:kotlin-reflect:_") - implementation("com.squareup.okhttp3:okhttp:4.9.0") - implementation("com.jsoniter:jsoniter:0.9.23") - implementation("com.squareup:kotlinpoet:1.7.2") - implementation("com.google.guava:guava:30.0-jre") + implementation(Square.okHttp3.okHttp) + implementation("com.jsoniter:jsoniter:_") + implementation(Square.kotlinPoet) + implementation("com.google.guava:guava:_") } tasks { diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts new file mode 100644 index 0000000..3ff9aab --- /dev/null +++ b/buildSrc/settings.gradle.kts @@ -0,0 +1,8 @@ +import de.fayard.refreshVersions.bootstrapRefreshVersionsForBuildSrc + +buildscript { + repositories { gradlePluginPortal() } + dependencies.classpath("de.fayard.refreshVersions:refreshVersions:0.9.7") +} + +bootstrapRefreshVersionsForBuildSrc() diff --git a/settings.gradle.kts b/settings.gradle.kts index 4ab8634..dfcaba3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,3 +1,5 @@ +import de.fayard.refreshVersions.bootstrapRefreshVersions + pluginManagement { repositories { mavenCentral() @@ -5,8 +7,15 @@ pluginManagement { } } +buildscript { + repositories { gradlePluginPortal() } + dependencies.classpath("de.fayard.refreshVersions:refreshVersions:0.9.7") +} + rootProject.name = "uranos" +bootstrapRefreshVersions() + include(":uranos-api") include(":uranos-nbt") include(":uranos-packet-codecs") diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts index 3606cc5..1ebdc45 100644 --- a/test-plugin/build.gradle.kts +++ b/test-plugin/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("jvm") - id("com.github.johnrengelman.shadow") version "6.1.0" + id("com.github.johnrengelman.shadow") } group = "space.uranos.testplugin" diff --git a/uranos-api/build.gradle.kts b/uranos-api/build.gradle.kts index dc147c7..54eb710 100644 --- a/uranos-api/build.gradle.kts +++ b/uranos-api/build.gradle.kts @@ -11,34 +11,26 @@ repositories { jcenter() } -val kotlinVersion = properties["version.kotlin"].toString() -val spekVersion = properties["version.spek"].toString() -val moshiVersion = properties["version.moshi"].toString() -val coroutinesVersion = properties["version.kotlinx-coroutines"].toString() -val nettyVersion = properties["version.netty"].toString() -val junitVersion = properties["version.junit"].toString() -val striktVersion = properties["version.strikt"].toString() -val guavaVersion = properties["version.guava"].toString() dependencies { // Kotlin - api("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") - api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}") + api("org.jetbrains.kotlin:kotlin-reflect:_") + api(KotlinX.coroutines.core) // JSON - kapt("com.squareup.moshi:moshi-kotlin-codegen:${moshiVersion}") - api("com.squareup.moshi:moshi:${moshiVersion}") + kapt(Square.moshi.kotlinCodegen) + api(Square.moshi) // Netty - api("io.netty:netty-buffer:${nettyVersion}") + api("io.netty:netty-buffer:_") // Other - api("com.google.guava:guava:$guavaVersion") + api("com.google.guava:guava:_") // Testing - testImplementation("io.strikt:strikt-core:${striktVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") + testImplementation(Testing.Strikt.core) + testImplementation(Testing.junit.api) + testRuntimeOnly(Testing.junit.engine) } kotlin { diff --git a/uranos-nbt/build.gradle.kts b/uranos-nbt/build.gradle.kts index 2c07e8b..a203a5d 100644 --- a/uranos-nbt/build.gradle.kts +++ b/uranos-nbt/build.gradle.kts @@ -10,18 +10,14 @@ repositories { jcenter() } -val nettyVersion = properties["version.netty"].toString() -val junitVersion = properties["version.junit"].toString() -val striktVersion = properties["version.strikt"].toString() - dependencies { // Netty - api("io.netty:netty-buffer:${nettyVersion}") + api("io.netty:netty-buffer:_") // Testing - testImplementation("io.strikt:strikt-core:${striktVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") + testImplementation(Testing.Strikt.core) + testImplementation(Testing.junit.api) + testRuntimeOnly(Testing.junit.engine) } tasks { diff --git a/uranos-packet-codecs/build.gradle.kts b/uranos-packet-codecs/build.gradle.kts index edc0ae6..8e7a9a3 100644 --- a/uranos-packet-codecs/build.gradle.kts +++ b/uranos-packet-codecs/build.gradle.kts @@ -10,25 +10,20 @@ repositories { jcenter() } -val nettyVersion = properties["version.netty"].toString() -val junitVersion = properties["version.junit"].toString() -val striktVersion = properties["version.strikt"].toString() -val guavaVersion = properties["version.guava"].toString() - dependencies { api(project(":uranos-packets")) api(project(":uranos-nbt")) // Netty - api("io.netty:netty-buffer:${nettyVersion}") + api("io.netty:netty-buffer:_") // Other - api("com.google.guava:guava:$guavaVersion") + api("com.google.guava:guava:_") // Testing - testImplementation("io.strikt:strikt-core:${striktVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") + testImplementation(Testing.Strikt.core) + testImplementation(Testing.junit.api) + testRuntimeOnly(Testing.junit.engine) } tasks { diff --git a/uranos-server/build.gradle.kts b/uranos-server/build.gradle.kts index 7cdf849..3a59555 100644 --- a/uranos-server/build.gradle.kts +++ b/uranos-server/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") kotlin("kapt") - id("com.github.johnrengelman.shadow") version "6.1.0" + id("com.github.johnrengelman.shadow") } group = rootProject.group @@ -13,17 +13,10 @@ repositories { maven("https://jitpack.io") } -val coroutinesVersion = properties["version.kotlinx-coroutines"].toString() -val slf4jVersion = properties["version.slf4j"].toString() -val nettyVersion = properties["version.netty"].toString() -val moshiVersion = properties["version.moshi"].toString() -val junitVersion = properties["version.junit"].toString() -val striktVersion = properties["version.strikt"].toString() - dependencies { // Kotlin - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutinesVersion}") + implementation(KotlinX.coroutines.core) + implementation(KotlinX.coroutines.jdk8) // TODO: What is jdk9? // Uranos implementation(project(":uranos-api")) @@ -32,36 +25,33 @@ dependencies { implementation(project(":uranos-nbt")) // Logging - implementation("org.slf4j:slf4j-api:${slf4jVersion}") - implementation("ch.qos.logback:logback-classic:1.2.3") - implementation("de.moritzruth:khalk:1.0.0-fix") + implementation("org.slf4j:slf4j-api:_") + implementation("ch.qos.logback:logback-classic:_") + implementation("de.moritzruth:khalk:_") // Netty - implementation("io.netty:netty-handler:${nettyVersion}") - implementation("io.netty:netty-buffer:${nettyVersion}") - implementation("io.netty:netty-codec:${nettyVersion}") - implementation("io.netty:netty-transport:${nettyVersion}") - implementation("io.netty:netty-transport-native-epoll:${nettyVersion}") - implementation("io.netty:netty-transport-native-kqueue:${nettyVersion}") + implementation("io.netty:netty-handler:_") + implementation("io.netty:netty-buffer:_") + implementation("io.netty:netty-codec:_") + implementation("io.netty:netty-transport:_") + implementation("io.netty:netty-transport-native-epoll:_") + implementation("io.netty:netty-transport-native-kqueue:_") // Other - implementation("com.squareup.okhttp3:okhttp:4.9.0") - implementation("com.sksamuel.hoplite:hoplite-core:1.3.9") - implementation("com.sksamuel.hoplite:hoplite-yaml:1.3.9") - kapt("com.squareup.moshi:moshi-kotlin-codegen:${moshiVersion}") + implementation(Square.okHttp3.okHttp) + implementation("com.sksamuel.hoplite:hoplite-core:_") + implementation("com.sksamuel.hoplite:hoplite-yaml:_") + kapt(Square.moshi.kotlinCodegen) // Testing - testImplementation("io.strikt:strikt-core:${striktVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") + testImplementation(Testing.Strikt.core) + testImplementation(Testing.junit.api) + testRuntimeOnly(Testing.junit.engine) } tasks { compileKotlin { - kotlinOptions.freeCompilerArgs = listOf( - "-Xopt-in=kotlin.RequiresOptIn", - "-progressive" - ) + kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" } test { diff --git a/versions.properties b/versions.properties new file mode 100644 index 0000000..5644df8 --- /dev/null +++ b/versions.properties @@ -0,0 +1,85 @@ +## suppress inspection "SpellCheckingInspection" for whole file +## suppress inspection "UnusedProperty" for whole file +## +## Dependencies and Plugin versions with their available updates +## Generated by $ ./gradlew refreshVersions +## Please, don't put extra comments in that file yet, keeping them is not supported yet. + +plugin.com.github.johnrengelman.shadow=6.1.0 +plugin.org.jetbrains.kotlin.kapt.gradle.plugin=1.4.20-RC +plugin.org.jetbrains.kotlin.jvm=1.4.20 + +version.ch.qos.logback..logback-classic=1.2.3 +## # available=1.3.0-alpha0 +## # available=1.3.0-alpha1 +## # available=1.3.0-alpha2 +## # available=1.3.0-alpha3 +## # available=1.3.0-alpha4 +## # available=1.3.0-alpha5 + +version.com.google.guava..guava=30.0-jre +## # available=30.1-android +## # available=30.1-jre + +version.com.jsoniter..jsoniter=0.9.23 + +version.com.sksamuel.hoplite..hoplite-core=1.3.13 + +version.com.sksamuel.hoplite..hoplite-yaml=1.3.13 + +version.de.moritzruth..khalk=1.0.0-fix + +version.io.netty..netty-buffer=4.1.54.Final +## # available=4.1.55.Final +## # available=4.1.56.Final +## # available=5.0.0.Alpha1 +## # available=5.0.0.Alpha2 + +version.io.netty..netty-codec=4.1.56.Final +## # available=5.0.0.Alpha1 +## # available=5.0.0.Alpha2 + +version.io.netty..netty-handler=4.1.56.Final +## # available=5.0.0.Alpha1 +## # available=5.0.0.Alpha2 + +version.io.netty..netty-transport=4.1.56.Final +## # available=5.0.0.Alpha1 +## # available=5.0.0.Alpha2 + +version.io.netty..netty-transport-native-epoll=4.1.56.Final +## # available=5.0.0.Alpha2 + +version.io.netty..netty-transport-native-kqueue=4.1.56.Final + +version.io.strikt..strikt-core=0.28.0 +## # available=0.28.1 + +version.kotlin=1.4.20 +## # available=1.4.21 +## # available=1.4.21-2 +## # available=1.4.30-M1 + +version.kotlinpoet=1.7.2 + +version.kotlinx.coroutines=1.4.2 + +version.moshi=1.11.0 + +version.okhttp3=4.9.0 +## # available=4.10.0-RC1 + +version.org.junit.jupiter..junit-jupiter-api=5.7.0 + +version.org.junit.jupiter..junit-jupiter-engine=5.7.0 + +version.org.slf4j..slf4j-api=1.7.30 +## # available=1.8.0-alpha0 +## # available=1.8.0-alpha1 +## # available=1.8.0-alpha2 +## # available=1.8.0-beta0 +## # available=1.8.0-beta1 +## # available=1.8.0-beta2 +## # available=1.8.0-beta4 +## # available=2.0.0-alpha0 +## # available=2.0.0-alpha1