-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* allure & compose * Publish wf * Update publish.yml * Update publish.yml * Update publish.yml * Fix publications * ultron-common publishing * Fix allure listeners * doc
- Loading branch information
1 parent
3ed5566
commit 753b91e
Showing
12 changed files
with
425 additions
and
163 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Publish to Maven Central | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- kmp-publishing | ||
|
||
jobs: | ||
publish: | ||
env: | ||
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
OSSRH_STAGING_PROFILE_ID: ${{ secrets.OSSRH_STAGING_PROFILE_ID }} | ||
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | ||
OSSRH_GPG_SECRET_KEY_ID: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- target: :ultron-compose:publishToSonatype | ||
os: ubuntu-latest | ||
- target: :ultron-android:publishToSonatype | ||
os: ubuntu-latest | ||
- target: :ultron-allure:publishToSonatype | ||
os: ubuntu-latest | ||
- target: :ultron-common:publishToSonatype | ||
os: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: "zulu" | ||
|
||
- name: Setup Gradle cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.konan | ||
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }} | ||
|
||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | ||
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | ||
|
||
- name: Gradle publish | ||
run: ./gradlew "${{ matrix.target }}" closeAndReleaseSonatypeStagingRepository |
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
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
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
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
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 |
---|---|---|
|
@@ -13,23 +13,10 @@ kotlin.mpp.enableCInteropCommonization=true | |
|
||
GROUP=com.atiurin | ||
POM_ARTIFACT_ID=ultron | ||
VERSION_NAME=2.4.0-alpha01 | ||
VERSION_NAME=2.5.0-alpha04 | ||
|
||
POM_NAME=ultron | ||
|
||
POM_PACKAGING=aar | ||
|
||
POM_DESCRIPTION=Android UI testing framework | ||
POM_INCEPTION_YEAR=2021 | ||
|
||
POM_URL=https://github.com/open-tool/ultron | ||
POM_SCM_URL=https://github.com/open-tool/ultron | ||
POM_SCM_CONNECTION=scm:[email protected]:open-tool/ultron.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:open-tool/ultron.git | ||
|
||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
|
||
POM_DEVELOPER_NAME=Aleksei Tiurin | ||
POM_DEVELOPER_URL=https://github.com/alex-tiurin | ||
signing.gnupg.passphrase=${OSSRH_GPG_SECRET_KEY_PASSWORD} | ||
signing.gnupg.keyName=${OSSRH_GPG_SECRET_KEY_ID} | ||
sonatypeUsername=${OSSRH_TOKEN} | ||
sonatypePassword=${OSSRH_PASSWORD} | ||
sonatypeStagingProfileId=${OSSRH_STAGING_PROFILE_ID} |
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
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,16 +1,18 @@ | ||
plugins { | ||
id("com.android.library") | ||
id("kotlin-android") | ||
id("com.vanniktech.maven.publish") | ||
id("org.jetbrains.dokka") | ||
id("maven-publish") | ||
id("signing") | ||
} | ||
|
||
group = project.findProperty("GROUP")!! | ||
version = project.findProperty("VERSION_NAME")!! | ||
|
||
|
||
android { | ||
compileSdk = 34 | ||
namespace = "com.atiurin.ultron.allure" | ||
compileSdk = 34 | ||
defaultConfig { | ||
minSdk = 21 | ||
} | ||
|
@@ -27,6 +29,12 @@ android { | |
targetCompatibility = JavaVersion.VERSION_17 | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
publishing { | ||
singleVariant("release") { | ||
withSourcesJar() | ||
} | ||
} | ||
} | ||
dependencies { | ||
implementation(Libs.kotlinStdlib) | ||
|
@@ -38,41 +46,72 @@ dependencies { | |
api(Libs.espressoCore) | ||
} | ||
|
||
tasks { | ||
val sourcesJar by creating(Jar::class) { | ||
archiveClassifier.set("sources") | ||
from(tasks) | ||
} | ||
val dokkaOutputDir = buildDir.resolve("dokka") | ||
tasks.dokkaHtml { outputDirectory.set(file(dokkaOutputDir)) } | ||
val deleteDokkaOutputDir by tasks.register<Delete>("deleteDokkaOutputDirectory") { delete(dokkaOutputDir) } | ||
val javadocJar = tasks.register<Jar>("javadocJar") { | ||
archiveClassifier.set("javadoc") | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml) | ||
from(dokkaOutputDir) | ||
} | ||
|
||
val javadoc by creating(Javadoc::class) { | ||
options { | ||
this as StandardJavadocDocletOptions | ||
addStringOption("Xdoclint:none", "-quiet") | ||
addStringOption("Xmaxwarns", "1") | ||
addStringOption("charSet", "UTF-8") | ||
} | ||
} | ||
publishing { | ||
publications { | ||
create<MavenPublication>("release") { | ||
artifact(javadocJar.get()) | ||
afterEvaluate { | ||
from(components["release"]) | ||
} | ||
|
||
val javadocJar by creating(Jar::class){ | ||
dependsOn(javadoc) | ||
from(javadoc.destinationDir) | ||
} | ||
pom { | ||
name.set("Ultron Allure") | ||
description.set("Android & Compose Multiplatform UI testing framework") | ||
url.set("https://github.com/open-tool/ultron") | ||
inceptionYear.set("2021") | ||
|
||
artifacts { | ||
add("archives", sourcesJar) | ||
add("archives", javadocJar) | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
|
||
issueManagement { | ||
system.set("GitHub Issues") | ||
url.set("https://github.com/open-tool/ultron/issues") | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("alex-tiurin") | ||
name.set("Aleksei Tiurin") | ||
url.set("https://github.com/open-tool") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:[email protected]:open-tool/ultron.git") | ||
developerConnection.set("scm:[email protected]:open-tool/ultron.git") | ||
url.set("https://github.com/open-tool/ultron") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach { | ||
dokkaSourceSets.configureEach { | ||
// Configure Dokka source sets here | ||
} | ||
tasks.withType<PublishToMavenRepository>().configureEach { | ||
dependsOn(tasks.withType<Sign>()) | ||
dependsOn(javadocJar) | ||
mustRunAfter(tasks.withType<Sign>()) | ||
} | ||
afterEvaluate { | ||
tasks.findByName("generateMetadataFileForMavenPublication")?.let { generateMetadataTask -> | ||
tasks.findByName("androidSourcesJar")?.let { androidSourcesJarTask -> | ||
generateMetadataTask.dependsOn(androidSourcesJarTask) | ||
} | ||
} | ||
|
||
tasks.named("generateMetadataFileForReleasePublication") { | ||
dependsOn(javadocJar) | ||
} | ||
|
||
signing { | ||
println("Signing lib...") | ||
useGpgCmd() | ||
sign(publishing.publications) | ||
} |
Oops, something went wrong.