diff --git a/build.gradle.kts b/build.gradle.kts index 71d46e4..d4386dc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.kotlin.jvm) apply false alias(libs.plugins.test.logger) apply false + alias(libs.plugins.jreleaser) } configure(subprojects) { @@ -16,7 +17,7 @@ configure(subprojects) { tasks.withType { useJUnitPlatform() - } + } configure { publications { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 15fe7cf..ab275c6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,3 +35,4 @@ pojo-tester = { module = "pl.pojo:pojo-tester", version = "0.7.6" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-plugin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" } test-logger = { id = "com.adarshr.test-logger", version = "4.0.0" } +jreleaser = { id = "org.jreleaser", version = "1.15.0" } diff --git a/jreleaser.yml b/jreleaser.yml new file mode 100644 index 0000000..3411ac2 --- /dev/null +++ b/jreleaser.yml @@ -0,0 +1,61 @@ +project: + name: FAForever Java Commons + version: 1.0.0 + description: A shared Java library for usage in the FAForever project + license: MIT + links: + homepage: https://github.com/FAForever/faf-java-commons + inceptionYear: 2017 + +release: + github: + overwrite: true + changelog: + formatted: ALWAYS + preset: conventional-commits + contributors: + format: '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}' + +distributions: + api: + active: ALWAYS + type: SINGLE_JAR + stereotype: NONE + artifacts: + - path: api/build/libs/api-{{projectVersion}}.jar + java: + groupId: com.faforever.commons + artifactId: api + + data: + active: ALWAYS + type: SINGLE_JAR + stereotype: NONE + artifacts: + - path: data/build/libs/data-{{projectVersion}}.jar + java: + groupId: com.faforever.commons + artifactId: data + + lobby: + active: ALWAYS + type: SINGLE_JAR + stereotype: NONE + artifacts: + - path: lobby/build/libs/lobby-{{projectVersion}}.jar + java: + groupId: com.faforever.commons + artifactId: lobby + +signing: + active: ALWAYS + armored: true + +deploy: + maven: + mavenCentral: + sonatype: + active: ALWAYS + url: https://central.sonatype.com/api/v1/publisher + stagingRepositories: + - target/staging-deploy