Skip to content

Commit

Permalink
Update dependencies for jetbrains subproject (#636)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rli authored Aug 8, 2024
1 parent 5c94e2f commit 100101a
Show file tree
Hide file tree
Showing 10 changed files with 298 additions and 210 deletions.
60 changes: 34 additions & 26 deletions telemetry/jetbrains/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import org.everit.json.schema.Schema
import org.everit.json.schema.loader.SchemaLoader
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.json.JSONObject

val jacksonVersion = "2.14.1"
val junitVersion = "4.13.2"
val kotlinVersion = "1.3.20"
val assertjVersion = "3.24.2"

plugins {
java
`kotlin-dsl`
kotlin("jvm") version "1.8.0"
alias(libs.plugins.kotlin.jvm)
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
alias(libs.plugins.nexus.publishing)
}

java {
Expand All @@ -28,8 +24,7 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath("com.github.erosb:everit-json-schema:1.14.1")
classpath(kotlin("gradle-plugin", version = "1.3.20"))
classpath(libs.json.schema)
}
}

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

dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("com.squareup:kotlinpoet:1.13.2")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
implementation("com.github.erosb:everit-json-schema:1.12.2")
testImplementation("junit:junit:$junitVersion")
testImplementation("org.assertj:assertj-core:$assertjVersion")
implementation(libs.kotlin.poet)
implementation(libs.jackson.module.kotlin)
implementation(libs.json.schema)
testImplementation(libs.junit4)
testImplementation(libs.assertj)
}

tasks {
compileKotlin {
dependsOn(":copyTelemetryResources", ":validatePackagedSchema")
kotlinOptions.jvmTarget = "1.8"
withType<KotlinCompile> {
compilerOptions.jvmTarget = JvmTarget.JVM_17
}
compileTestKotlin {
dependsOn(":copyTestTelemetryResources")
kotlinOptions.jvmTarget = "1.8"
}
register("validatePackagedSchema") {

val validatePackagedSchema by registering {
group = "build"
description = "Validates that the packaged definition is compatable with the packaged schema"
doFirst {
Expand All @@ -74,16 +64,34 @@ tasks {
}
}
}
task(name = "copyTelemetryResources", type = Copy::class) {

val copyTelemetryResources by registering(Copy::class) {
from("..")
include("*.json", "definitions/*.json")
into("src/main/resources/")
}
task(name = "copyTestTelemetryResources", type = Copy::class) {

val copyTestTelemetryResources by registering(Copy::class) {
from("..")
include("*.json", "definitions/*.json")
into("src/test/resources/")
}

compileKotlin {
dependsOn(copyTelemetryResources, validatePackagedSchema)
}

compileTestKotlin {
dependsOn(copyTestTelemetryResources)
}

processResources {
dependsOn(copyTelemetryResources)
}

processTestResources {
dependsOn(copyTestTelemetryResources)
}
}

// maven can't handle this
Expand Down
20 changes: 20 additions & 0 deletions telemetry/jetbrains/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[versions]
assertJ = "3.26.3"
jackson = "2.17.2"
# deprecated; should move to json-skema
jsonSchema = "1.14.4"
junit4 = "4.13.2"
kotlin = "2.0.10"
kotlin-poet = "1.18.1"
nexus = "2.0.0"

[libraries]
assertj = { module = "org.assertj:assertj-core", version.ref = "assertJ" }
kotlin-poet = { module = "com.squareup:kotlinpoet", version.ref = "kotlin-poet" }
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
json-schema = { module = "com.github.erosb:everit-json-schema", version.ref = "jsonSchema" }
junit4 = { module = "junit:junit", version.ref = "junit4" }

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
nexus-publishing = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus" }
Binary file modified telemetry/jetbrains/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion telemetry/jetbrains/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 100101a

Please sign in to comment.