Skip to content

Commit 100101a

Browse files
authored
Update dependencies for jetbrains subproject (#636)
* Update Gradle to 8.9 * Change dependency declarations to version catalog * Update Kotlin to 2.0.10 * Update everit-json-schema to 1.14.4 * Update kotlinpoet to 1.18.1 * Update jackson to 2.17.2 * Update assertJ to 2.26.3 * Update gradle-nexus.publish-plugin to 2.0.0
1 parent 5c94e2f commit 100101a

File tree

10 files changed

+298
-210
lines changed

10 files changed

+298
-210
lines changed

telemetry/jetbrains/build.gradle.kts

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
import org.everit.json.schema.Schema
22
import org.everit.json.schema.loader.SchemaLoader
33
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
4+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
5+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
46
import org.json.JSONObject
57

6-
val jacksonVersion = "2.14.1"
7-
val junitVersion = "4.13.2"
8-
val kotlinVersion = "1.3.20"
9-
val assertjVersion = "3.24.2"
10-
118
plugins {
12-
java
139
`kotlin-dsl`
14-
kotlin("jvm") version "1.8.0"
10+
alias(libs.plugins.kotlin.jvm)
1511
`maven-publish`
1612
signing
17-
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
13+
alias(libs.plugins.nexus.publishing)
1814
}
1915

2016
java {
@@ -28,8 +24,7 @@ buildscript {
2824
gradlePluginPortal()
2925
}
3026
dependencies {
31-
classpath("com.github.erosb:everit-json-schema:1.14.1")
32-
classpath(kotlin("gradle-plugin", version = "1.3.20"))
27+
classpath(libs.json.schema)
3328
}
3429
}
3530

@@ -40,24 +35,19 @@ repositories {
4035
group = "software.aws.toolkits"
4136

4237
dependencies {
43-
implementation(kotlin("stdlib-jdk8"))
44-
implementation("com.squareup:kotlinpoet:1.13.2")
45-
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
46-
implementation("com.github.erosb:everit-json-schema:1.12.2")
47-
testImplementation("junit:junit:$junitVersion")
48-
testImplementation("org.assertj:assertj-core:$assertjVersion")
38+
implementation(libs.kotlin.poet)
39+
implementation(libs.jackson.module.kotlin)
40+
implementation(libs.json.schema)
41+
testImplementation(libs.junit4)
42+
testImplementation(libs.assertj)
4943
}
5044

5145
tasks {
52-
compileKotlin {
53-
dependsOn(":copyTelemetryResources", ":validatePackagedSchema")
54-
kotlinOptions.jvmTarget = "1.8"
46+
withType<KotlinCompile> {
47+
compilerOptions.jvmTarget = JvmTarget.JVM_17
5548
}
56-
compileTestKotlin {
57-
dependsOn(":copyTestTelemetryResources")
58-
kotlinOptions.jvmTarget = "1.8"
59-
}
60-
register("validatePackagedSchema") {
49+
50+
val validatePackagedSchema by registering {
6151
group = "build"
6252
description = "Validates that the packaged definition is compatable with the packaged schema"
6353
doFirst {
@@ -74,16 +64,34 @@ tasks {
7464
}
7565
}
7666
}
77-
task(name = "copyTelemetryResources", type = Copy::class) {
67+
68+
val copyTelemetryResources by registering(Copy::class) {
7869
from("..")
7970
include("*.json", "definitions/*.json")
8071
into("src/main/resources/")
8172
}
82-
task(name = "copyTestTelemetryResources", type = Copy::class) {
73+
74+
val copyTestTelemetryResources by registering(Copy::class) {
8375
from("..")
8476
include("*.json", "definitions/*.json")
8577
into("src/test/resources/")
8678
}
79+
80+
compileKotlin {
81+
dependsOn(copyTelemetryResources, validatePackagedSchema)
82+
}
83+
84+
compileTestKotlin {
85+
dependsOn(copyTestTelemetryResources)
86+
}
87+
88+
processResources {
89+
dependsOn(copyTelemetryResources)
90+
}
91+
92+
processTestResources {
93+
dependsOn(copyTestTelemetryResources)
94+
}
8795
}
8896

8997
// maven can't handle this
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[versions]
2+
assertJ = "3.26.3"
3+
jackson = "2.17.2"
4+
# deprecated; should move to json-skema
5+
jsonSchema = "1.14.4"
6+
junit4 = "4.13.2"
7+
kotlin = "2.0.10"
8+
kotlin-poet = "1.18.1"
9+
nexus = "2.0.0"
10+
11+
[libraries]
12+
assertj = { module = "org.assertj:assertj-core", version.ref = "assertJ" }
13+
kotlin-poet = { module = "com.squareup:kotlinpoet", version.ref = "kotlin-poet" }
14+
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
15+
json-schema = { module = "com.github.erosb:everit-json-schema", version.ref = "jsonSchema" }
16+
junit4 = { module = "junit:junit", version.ref = "junit4" }
17+
18+
[plugins]
19+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
20+
nexus-publishing = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus" }
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)