Skip to content

Commit 6692aa5

Browse files
committed
add signing
1 parent 278ef46 commit 6692aa5

File tree

3 files changed

+77
-44
lines changed

3 files changed

+77
-44
lines changed

build.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
import java.time.Duration
2+
13
plugins {
24
kotlin("jvm") version "2.1.10"
5+
id("maven-publish")
6+
id("signing")
7+
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
38
}
49

510
group = "com.expediagroup.sdk"
@@ -12,7 +17,19 @@ repositories {
1217
}
1318
}
1419

20+
nexusPublishing {
21+
repositories {
22+
sonatype {
23+
username.set(System.getenv("SONATYPE_USERNAME"))
24+
password.set(System.getenv("SONATYPE_PASSWORD"))
25+
}
26+
}
1527

28+
transitionCheckOptions {
29+
maxRetries.set(60)
30+
delayBetween.set(Duration.ofMillis(5000))
31+
}
32+
}
1633

1734
dependencies {
1835
testImplementation(kotlin("test"))

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pluginManagement {
1212
plugins {
1313
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
1414
}
15+
1516
rootProject.name = "xap-java-sdk"
1617
include("xap-sdk")
1718
include("generator")

xap-sdk/build.gradle.kts

Lines changed: 59 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,13 @@ plugins {
88
id("org.jlleitschuh.gradle.ktlint") version "12.1.2"
99
}
1010

11-
group = "com.expediagroup.sdk"
12-
version = "1.0.0-SNAPSHOT"
13-
1411
repositories {
1512
mavenCentral()
1613
maven {
1714
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
1815
}
1916
}
2017

21-
dependencies {
22-
testImplementation(kotlin("test"))
23-
api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT")
24-
implementation("com.expediagroup:expediagroup-sdk-transport-okhttp:0.0.1-beta-SNAPSHOT")
25-
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2")
26-
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2")
27-
implementation("org.slf4j:slf4j-simple:2.0.16")
28-
runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2")
29-
}
30-
31-
tasks.test {
32-
useJUnitPlatform()
33-
}
34-
35-
kotlin {
36-
jvmToolchain(21)
37-
compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8)
38-
}
39-
40-
java {
41-
withSourcesJar()
42-
targetCompatibility = JavaVersion.VERSION_1_8
43-
sourceCompatibility = JavaVersion.VERSION_1_8
44-
}
45-
46-
ktlint {
47-
debug = true
48-
version = "1.5.0"
49-
verbose = true
50-
51-
additionalEditorconfig =
52-
mapOf(
53-
"max_line_length" to "200",
54-
"indent_style" to "space",
55-
"indent_size" to "4",
56-
"insert_final_newline" to "true",
57-
"end_of_line" to "lf",
58-
"ktlint_standard_enum-entry-name-case" to "disabled",
59-
)
60-
}
61-
6218
publishing {
6319
publications {
6420
create<MavenPublication>("mavenJava") {
@@ -113,6 +69,65 @@ signing {
11369
sign(publishing.publications)
11470
}
11571

72+
group = "com.expediagroup.sdk"
73+
version = "1.0.0-SNAPSHOT"
74+
75+
76+
//nexusPublishing {
77+
// repositories {
78+
// sonatype {
79+
// username.set(System.getenv("SONATYPE_USERNAME"))
80+
// password.set(System.getenv("SONATYPE_PASSWORD"))
81+
// }
82+
// }
83+
//
84+
// transitionCheckOptions {
85+
// maxRetries.set(60)
86+
// delayBetween.set(Duration.ofMillis(5000))
87+
// }
88+
//}
89+
90+
dependencies {
91+
testImplementation(kotlin("test"))
92+
api("com.expediagroup:expediagroup-sdk-rest:0.0.1-beta-SNAPSHOT")
93+
implementation("com.expediagroup:expediagroup-sdk-transport-okhttp:0.0.1-beta-SNAPSHOT")
94+
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2")
95+
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2")
96+
implementation("org.slf4j:slf4j-simple:2.0.16")
97+
runtimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2")
98+
}
99+
100+
tasks.test {
101+
useJUnitPlatform()
102+
}
103+
104+
kotlin {
105+
jvmToolchain(21)
106+
compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8)
107+
}
108+
109+
java {
110+
withSourcesJar()
111+
targetCompatibility = JavaVersion.VERSION_1_8
112+
sourceCompatibility = JavaVersion.VERSION_1_8
113+
}
114+
115+
ktlint {
116+
debug = true
117+
version = "1.5.0"
118+
verbose = true
119+
120+
additionalEditorconfig =
121+
mapOf(
122+
"max_line_length" to "200",
123+
"indent_style" to "space",
124+
"indent_size" to "4",
125+
"insert_final_newline" to "true",
126+
"end_of_line" to "lf",
127+
"ktlint_standard_enum-entry-name-case" to "disabled",
128+
)
129+
}
130+
116131
gradle.taskGraph.whenReady {
117132
if (hasTask(":publishSnapshots")) {
118133
rootProject.version = "1.0.0-SNAPSHOT"

0 commit comments

Comments
 (0)