-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): update publishing configuration across all projects
- Adjusted publishing settings in `build.gradle.kts` to standardize publication process. - Ensured compatibility and alignment with updated project requirements.
- Loading branch information
Showing
4 changed files
with
179 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import java.time.Duration | ||
|
||
plugins { | ||
java | ||
signing | ||
id("maven-publish") | ||
|
||
kotlin("jvm") version "1.9.24" | ||
kotlin("plugin.serialization") version "1.9.24" | ||
id("maven-publish") | ||
} | ||
|
||
val gradleScriptDir by extra("${rootProject.projectDir}/gradle") | ||
id("io.github.gradle-nexus.publish-plugin") version "1.1.0" | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
|
@@ -20,12 +24,29 @@ buildscript { | |
} | ||
} | ||
|
||
val gradleScriptDir by extra("${rootProject.projectDir}/gradle") | ||
|
||
nexusPublishing { | ||
connectTimeout.set(Duration.ofMinutes(7)) | ||
clientTimeout.set(Duration.ofMinutes(7)) | ||
|
||
transitionCheckOptions { | ||
maxRetries.set(100) | ||
delayBetween.set(Duration.ofSeconds(10)) | ||
} | ||
|
||
repositories { | ||
sonatype() | ||
} | ||
} | ||
|
||
allprojects { | ||
group = "io.qase" | ||
version = "1.0.0" | ||
|
||
repositories { | ||
mavenCentral() | ||
google() | ||
mavenLocal() | ||
} | ||
|
||
|
@@ -36,8 +57,12 @@ allprojects { | |
} | ||
} | ||
|
||
configure(subprojects.filter { !it.name.contains("android") } | ||
.filter { !it.name.contains("kaspresso") }) { | ||
configure( | ||
subprojects | ||
.filter { !it.name.contains("android") } | ||
.filter { !it.name.contains("kaspresso") } | ||
) { | ||
apply(plugin = "signing") | ||
apply(plugin = "maven-publish") | ||
apply(plugin = "org.jetbrains.kotlin.jvm") | ||
|
||
|
@@ -47,10 +72,12 @@ configure(subprojects.filter { !it.name.contains("android") } | |
|
||
tasks.jar { | ||
manifest { | ||
attributes(mapOf( | ||
"Implementation-Title" to project.name, | ||
"Implementation-Version" to project.version | ||
)) | ||
attributes( | ||
mapOf( | ||
"Implementation-Title" to project.name, | ||
"Implementation-Version" to project.version | ||
) | ||
) | ||
} | ||
} | ||
|
||
|
@@ -59,6 +86,11 @@ configure(subprojects.filter { !it.name.contains("android") } | |
archiveClassifier.set("sources") | ||
} | ||
|
||
val javadocJar by tasks.creating(Jar::class) { | ||
from(tasks.getByName("javadoc")) | ||
archiveClassifier.set("javadoc") | ||
} | ||
|
||
tasks.withType(Javadoc::class) { | ||
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") | ||
} | ||
|
@@ -71,13 +103,49 @@ configure(subprojects.filter { !it.name.contains("android") } | |
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
artifact(javadocJar) | ||
artifact(sourceJar) | ||
from(components["java"]) | ||
|
||
pom { | ||
name.set(project.name) | ||
description.set("Module ${project.name} of Qase Kotlin reporters.") | ||
url.set("https://github.com/qase-tms/qase-kotlin") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("qase-tms") | ||
name.set("Qase Team") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
developerConnection.set("scm:git:git://github.com/qase-tms/qase-kotlin") | ||
connection.set("scm:git:git://github.com/qase-tms/qase-kotlin") | ||
url.set("https://github.com/qase-tms/qase-kotlin") | ||
} | ||
issueManagement { | ||
system.set("GitHub Issues") | ||
url.set("https://github.com/qase-tms/qase-kotlin/issue") | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
mavenLocal() | ||
} | ||
} | ||
|
||
// signing { | ||
// val signingKeyId: String? by project | ||
// val signingKey: String? by project | ||
// val signingPassword: String? by project | ||
// useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) | ||
// | ||
// sign(publishing.publications["maven"]) | ||
// } | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>().configureEach { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
description = "Qase Kotlin Kaspresso reporter" | ||
|
||
plugins { | ||
id("com.android.library") | ||
kotlin("android") | ||
id("maven-publish") | ||
signing | ||
} | ||
|
||
apply(plugin = "maven-publish") | ||
|
@@ -69,19 +72,53 @@ tasks.register<Jar>("androidSourcesJar") { | |
from(android.sourceSets["main"].java.srcDirs) | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenAndroid") { | ||
afterEvaluate { | ||
afterEvaluate { | ||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
from(components["release"]) | ||
artifact(tasks.getByName<Jar>("androidJavadocsJar")) | ||
|
||
pom { | ||
name.set(project.name) | ||
description.set("Module ${project.name} of Qase Kotlin reporters.") | ||
url.set("https://github.com/qase-tms/qase-kotlin") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("qase-tms") | ||
name.set("Qase Team") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
developerConnection.set("scm:git:git://github.com/qase-tms/qase-kotlin") | ||
connection.set("scm:git:git://github.com/qase-tms/qase-kotlin") | ||
url.set("https://github.com/qase-tms/qase-kotlin") | ||
} | ||
issueManagement { | ||
system.set("GitHub Issues") | ||
url.set("https://github.com/qase-tms/qase-kotlin/issue") | ||
} | ||
} | ||
} | ||
groupId = "io.qase" | ||
artifactId = "qase-kaspresso-reporter" | ||
version = "1.0.0" | ||
|
||
} | ||
} | ||
repositories { | ||
mavenLocal() | ||
} | ||
|
||
// signing { | ||
// val signingKeyId: String? by project | ||
// val signingKey: String? by project | ||
// val signingPassword: String? by project | ||
// useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) | ||
// | ||
// sign(publishing.publications["maven"]) | ||
// } | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
description = "Qase Kotlin Android Integration" | ||
|
||
plugins { | ||
id("com.android.library") | ||
kotlin("android") | ||
id("maven-publish") | ||
signing | ||
} | ||
|
||
apply(plugin = "maven-publish") | ||
|
@@ -54,7 +57,8 @@ tasks.register<Javadoc>("androidJavadocs") { | |
"http://docs.oracle.com/javase/7/docs/api/", | ||
"http://developer.android.com/reference/", | ||
"http://hc.apache.org/httpcomponents-client-5.0.x/httpclient5/apidocs/", | ||
"http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5/apidocs/") | ||
"http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5/apidocs/" | ||
) | ||
} | ||
|
||
tasks.register<Jar>("androidJavadocsJar") { | ||
|
@@ -69,18 +73,53 @@ tasks.register<Jar>("androidSourcesJar") { | |
from(android.sourceSets["main"].java.srcDirs) | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenAndroid") { | ||
afterEvaluate { | ||
afterEvaluate { | ||
println(components.names) | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
from(components["release"]) | ||
artifact(tasks.getByName<Jar>("androidJavadocsJar")) | ||
|
||
pom { | ||
name.set(project.name) | ||
description.set("Module ${project.name} of Qase Kotlin reporters.") | ||
url.set("https://github.com/qase-tms/qase-kotlin") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("qase-tms") | ||
name.set("Qase Team") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
developerConnection.set("scm:git:git://github.com/qase-tms/qase-kotlin") | ||
connection.set("scm:git:git://github.com/qase-tms/qase-kotlin") | ||
url.set("https://github.com/qase-tms/qase-kotlin") | ||
} | ||
issueManagement { | ||
system.set("GitHub Issues") | ||
url.set("https://github.com/qase-tms/qase-kotlin/issue") | ||
} | ||
} | ||
} | ||
groupId = "io.qase" | ||
artifactId = "qase-kotlin-android" | ||
version = "1.0.0" | ||
|
||
} | ||
} | ||
repositories { | ||
mavenLocal() | ||
} | ||
|
||
// signing { | ||
// val signingKeyId: String? by project | ||
// val signingKey: String? by project | ||
// val signingPassword: String? by project | ||
// useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) | ||
// | ||
// sign(publishing.publications["maven"]) | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters