11plugins {
2- id(" maven-publish " )
3- id(" signing " )
4- id( " io.github.gradle-nexus.publish-plugin " ) version " 2.0.0 "
5- kotlin( " multiplatform " ) version " 1.9.25 "
6- kotlin( " plugin.serialization " ) version " 1.5.21 "
2+ id(" module.publication " )
3+ id(" module.spotless " )
4+ alias(libs.plugins.kotest.multiplatform)
5+ alias(libs.plugins.kotlin.multiplatform)
6+ alias(libs.plugins.kotlinx.serialization)
77}
88
9- group = " community.flock.kotlinx.openapi.bindings "
10- version = " 0.1.3 "
9+ group = libs.versions.group.id.get()
10+ version = System .getenv(libs.versions.from.env.get()) ? : libs.versions.default.get()
1111
1212repositories {
1313 mavenCentral()
@@ -26,84 +26,21 @@ kotlin {
2626 withJava()
2727 java {
2828 toolchain {
29- languageVersion.set(JavaLanguageVersion .of(17 ))
29+ languageVersion.set(JavaLanguageVersion .of(libs.versions.java.get() ))
3030 }
3131 }
3232 }
3333 }
3434 sourceSets {
3535 commonMain {
3636 dependencies {
37- implementation(" org.jetbrains. kotlinx:kotlinx-serialization-json:1.5.0 " )
37+ implementation(libs. kotlinx.serialization )
3838 }
3939 }
4040 commonTest {
4141 dependencies {
42- implementation(kotlin(" test-common" ))
43- implementation(kotlin(" test-annotations-common" ))
44- implementation(kotlin(" test-junit" ))
45- implementation(" io.kotest:kotest-framework-engine:5.6.1" )
46- implementation(" io.kotest:kotest-assertions-core:5.6.1" )
47- implementation(" io.kotest:kotest-assertions-json:5.6.1" )
48- }
49- }
50- }
51- }
52-
53- nexusPublishing {
54- repositories {
55- sonatype {
56- nexusUrl.set(uri(" https://ossrh-staging-api.central.sonatype.com/service/local/" ))
57- snapshotRepositoryUrl.set(uri(" https://central.sonatype.com/repository/maven-snapshots/" ))
58- username.set(System .getenv(" SONATYPE_USERNAME" ))
59- password.set(System .getenv(" SONATYPE_PASSWORD" ))
60- stagingProfileId.set(System .getenv(" SONATYPE_STAGING_PROFILE_ID" ))
61- }
62- }
63- }
64-
65- signing {
66- setRequired { System .getenv(" GPG_PRIVATE_KEY" ) != null }
67- useInMemoryPgpKeys(
68- System .getenv(" GPG_PRIVATE_KEY" ),
69- System .getenv(" GPG_PASSPHRASE" ),
70- )
71- sign(publishing.publications)
72- }
73-
74- publishing {
75- publications {
76- withType<MavenPublication > {
77- artifact(
78- tasks.register(" ${name} JavadocJar" , Jar ::class ) {
79- archiveClassifier.set(" javadoc" )
80- archiveAppendix.set(this @withType.name)
81- },
82- )
83- pom {
84- name.set(" Flock. community" )
85- description.set(" Kotlin openapi bindings" )
86- licenses {
87- license {
88- name.set(" MIT" )
89- url.set(" https://opensource.org/licenses/MIT" )
90- }
91- }
92- url.set(" https://flock.community" )
93- issueManagement {
94- system.set(" Github" )
95- url.set(" https://github.com/flock-community/kotlin-openapi-bindings/issues" )
96- }
97- scm {
98- connection.set(" https://github.com/flock-community/kotlin-openapi-bindings.git" )
99- url.set(" https://github.com/flock-community/kotlin-openapi-bindings" )
100- }
101- developers {
102- developer {
103- name.set(" Willem Veelenturf" )
104- 105- }
106- }
42+ implementation(libs.bundles.kotlin.test)
43+ implementation(libs.bundles.kotest)
10744 }
10845 }
10946 }
0 commit comments