Archived
1
0
Fork 0

Use the refreshVersions Gradle plugin

This commit is contained in:
Moritz Ruth 2021-01-03 13:06:53 +01:00
parent d46675dff3
commit ec74ddff82
11 changed files with 172 additions and 74 deletions

View file

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run refreshVersions" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--console=plain" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="refreshVersions" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

View file

@ -1,8 +1,8 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
kotlin("jvm") version "1.4.20" kotlin("jvm")
kotlin("kapt") version "1.4.20-RC" kotlin("kapt")
id("minecraft-data-sources") id("minecraft-data-sources")
} }

View file

@ -1,6 +1,6 @@
plugins { plugins {
`java-gradle-plugin` `java-gradle-plugin`
kotlin("jvm") version "1.4.20" kotlin("jvm")
} }
repositories { repositories {
@ -8,12 +8,12 @@ repositories {
} }
dependencies { 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(Square.okHttp3.okHttp)
implementation("com.jsoniter:jsoniter:0.9.23") implementation("com.jsoniter:jsoniter:_")
implementation("com.squareup:kotlinpoet:1.7.2") implementation(Square.kotlinPoet)
implementation("com.google.guava:guava:30.0-jre") implementation("com.google.guava:guava:_")
} }
tasks { tasks {

View file

@ -0,0 +1,8 @@
import de.fayard.refreshVersions.bootstrapRefreshVersionsForBuildSrc
buildscript {
repositories { gradlePluginPortal() }
dependencies.classpath("de.fayard.refreshVersions:refreshVersions:0.9.7")
}
bootstrapRefreshVersionsForBuildSrc()

View file

@ -1,3 +1,5 @@
import de.fayard.refreshVersions.bootstrapRefreshVersions
pluginManagement { pluginManagement {
repositories { repositories {
mavenCentral() mavenCentral()
@ -5,8 +7,15 @@ pluginManagement {
} }
} }
buildscript {
repositories { gradlePluginPortal() }
dependencies.classpath("de.fayard.refreshVersions:refreshVersions:0.9.7")
}
rootProject.name = "uranos" rootProject.name = "uranos"
bootstrapRefreshVersions()
include(":uranos-api") include(":uranos-api")
include(":uranos-nbt") include(":uranos-nbt")
include(":uranos-packet-codecs") include(":uranos-packet-codecs")

View file

@ -1,6 +1,6 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("com.github.johnrengelman.shadow") version "6.1.0" id("com.github.johnrengelman.shadow")
} }
group = "space.uranos.testplugin" group = "space.uranos.testplugin"

View file

@ -11,34 +11,26 @@ repositories {
jcenter() 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 { dependencies {
// Kotlin // Kotlin
api("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") api("org.jetbrains.kotlin:kotlin-reflect:_")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}") api(KotlinX.coroutines.core)
// JSON // JSON
kapt("com.squareup.moshi:moshi-kotlin-codegen:${moshiVersion}") kapt(Square.moshi.kotlinCodegen)
api("com.squareup.moshi:moshi:${moshiVersion}") api(Square.moshi)
// Netty // Netty
api("io.netty:netty-buffer:${nettyVersion}") api("io.netty:netty-buffer:_")
// Other // Other
api("com.google.guava:guava:$guavaVersion") api("com.google.guava:guava:_")
// Testing // Testing
testImplementation("io.strikt:strikt-core:${striktVersion}") testImplementation(Testing.Strikt.core)
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") testImplementation(Testing.junit.api)
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") testRuntimeOnly(Testing.junit.engine)
} }
kotlin { kotlin {

View file

@ -10,18 +10,14 @@ repositories {
jcenter() jcenter()
} }
val nettyVersion = properties["version.netty"].toString()
val junitVersion = properties["version.junit"].toString()
val striktVersion = properties["version.strikt"].toString()
dependencies { dependencies {
// Netty // Netty
api("io.netty:netty-buffer:${nettyVersion}") api("io.netty:netty-buffer:_")
// Testing // Testing
testImplementation("io.strikt:strikt-core:${striktVersion}") testImplementation(Testing.Strikt.core)
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") testImplementation(Testing.junit.api)
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") testRuntimeOnly(Testing.junit.engine)
} }
tasks { tasks {

View file

@ -10,25 +10,20 @@ repositories {
jcenter() 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 { dependencies {
api(project(":uranos-packets")) api(project(":uranos-packets"))
api(project(":uranos-nbt")) api(project(":uranos-nbt"))
// Netty // Netty
api("io.netty:netty-buffer:${nettyVersion}") api("io.netty:netty-buffer:_")
// Other // Other
api("com.google.guava:guava:$guavaVersion") api("com.google.guava:guava:_")
// Testing // Testing
testImplementation("io.strikt:strikt-core:${striktVersion}") testImplementation(Testing.Strikt.core)
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") testImplementation(Testing.junit.api)
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") testRuntimeOnly(Testing.junit.engine)
} }
tasks { tasks {

View file

@ -1,7 +1,7 @@
plugins { plugins {
kotlin("jvm") kotlin("jvm")
kotlin("kapt") kotlin("kapt")
id("com.github.johnrengelman.shadow") version "6.1.0" id("com.github.johnrengelman.shadow")
} }
group = rootProject.group group = rootProject.group
@ -13,17 +13,10 @@ repositories {
maven("https://jitpack.io") 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 { dependencies {
// Kotlin // Kotlin
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}") implementation(KotlinX.coroutines.core)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutinesVersion}") implementation(KotlinX.coroutines.jdk8) // TODO: What is jdk9?
// Uranos // Uranos
implementation(project(":uranos-api")) implementation(project(":uranos-api"))
@ -32,36 +25,33 @@ dependencies {
implementation(project(":uranos-nbt")) implementation(project(":uranos-nbt"))
// Logging // Logging
implementation("org.slf4j:slf4j-api:${slf4jVersion}") implementation("org.slf4j:slf4j-api:_")
implementation("ch.qos.logback:logback-classic:1.2.3") implementation("ch.qos.logback:logback-classic:_")
implementation("de.moritzruth:khalk:1.0.0-fix") implementation("de.moritzruth:khalk:_")
// Netty // Netty
implementation("io.netty:netty-handler:${nettyVersion}") implementation("io.netty:netty-handler:_")
implementation("io.netty:netty-buffer:${nettyVersion}") implementation("io.netty:netty-buffer:_")
implementation("io.netty:netty-codec:${nettyVersion}") implementation("io.netty:netty-codec:_")
implementation("io.netty:netty-transport:${nettyVersion}") implementation("io.netty:netty-transport:_")
implementation("io.netty:netty-transport-native-epoll:${nettyVersion}") implementation("io.netty:netty-transport-native-epoll:_")
implementation("io.netty:netty-transport-native-kqueue:${nettyVersion}") implementation("io.netty:netty-transport-native-kqueue:_")
// Other // Other
implementation("com.squareup.okhttp3:okhttp:4.9.0") implementation(Square.okHttp3.okHttp)
implementation("com.sksamuel.hoplite:hoplite-core:1.3.9") implementation("com.sksamuel.hoplite:hoplite-core:_")
implementation("com.sksamuel.hoplite:hoplite-yaml:1.3.9") implementation("com.sksamuel.hoplite:hoplite-yaml:_")
kapt("com.squareup.moshi:moshi-kotlin-codegen:${moshiVersion}") kapt(Square.moshi.kotlinCodegen)
// Testing // Testing
testImplementation("io.strikt:strikt-core:${striktVersion}") testImplementation(Testing.Strikt.core)
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}") testImplementation(Testing.junit.api)
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}") testRuntimeOnly(Testing.junit.engine)
} }
tasks { tasks {
compileKotlin { compileKotlin {
kotlinOptions.freeCompilerArgs = listOf( kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
"-Xopt-in=kotlin.RequiresOptIn",
"-progressive"
)
} }
test { test {

85
versions.properties Normal file
View file

@ -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