Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions .github/workflows/build_1.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,14 @@ jobs:
mergeDetektSarif
:plugins:buildPlugins
--continue
- name: Check publication setup
run: >
./gradlew
publishAppyxReleasePublicationToOSSRHRepository
publishAppyxReleasePublicationToSonatypeSnapshotRepository
--dry-run
--no-parallel
- name: Deploy snapshot
if: env.MAIN_BRANCH == 'true' && github.repository == 'bumble-tech/appyx'
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: >
./gradlew
publishAppyxReleasePublicationToSonatypeSnapshotRepository
-Psnapshot=true
--no-parallel
-Psigning.password=${{ secrets.SIGNING_PASSWORD }}
-Psonatype.username=${{ secrets.SONATYPE_USERNAME }}
-Psonatype.password=${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishAllPublicationsToMavenCentralRepository -Psnapshot=true
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/build_2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,11 @@ jobs:
- name: Deploy snapshot
if: env.MAIN_BRANCH == 'true' && github.repository == 'bumble-tech/appyx'
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: >
./gradlew
publishAllPublicationsToSonatypeSnapshotRepository
-Psnapshot=true
--no-parallel
-Psigning.password=${{ secrets.SIGNING_PASSWORD }}
-Psonatype.username=${{ secrets.SONATYPE_USERNAME }}
-Psonatype.password=${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishAllPublicationsToMavenCentralRepository -Psnapshot=true
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
with:
cache-read-only: true
arguments: |
publishAppyxReleasePublicationToOSSRHRepository
--no-parallel
-Psigning.password=${{ secrets.SIGNING_PASSWORD }}
-Psonatype.username=${{ secrets.SONATYPE_USERNAME }}
-Psonatype.password=${{ secrets.SONATYPE_PASSWORD }}
- name: Build & publish
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
# Plugin requires "--no-configuration-cache" flag
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache
50 changes: 24 additions & 26 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,31 @@

## Automatic

1. Create PR with following changes:
1. Update version in `gradle.properties`.
2. Create a new section with version name taking all changes from pending section.
2. Create GitHub release with a tag name of the version and fill notes from pending changes section.
3. Library is published to staging repository automatically with GitHub Action.
4. Proceed to 'Closing staging repository'.
1. Create a PR with the following changes:
1. Update the version in `gradle.properties`.
2. Create a new section with the version name, including all changes from the pending section.
2. Create a GitHub release with a tag name matching the version and fill in the release notes using the pending changes section.
3. The library will be published to the staging repository automatically via GitHub Actions.
4. [Proceed to closing the staging repository](#closing-staging-repository).

In case of any issues you can launch Release manually from GitHub Actions tab.
If any issues arise, you can manually launch the release from the GitHub Actions tab.

## Manual

Should be used in case if there are issues with automatic publication.

1. Create PR with following changes:
1. Update version in `gradle.properties`.
2. Create a new section with version name taking all changes from pending section.
2. `./gradle publishAppyxReleasePublicationToOSSRHRepository --no-parallel -Psigning.keyId=$KEY_ID -Psigning.password=$PASS -Psigning.secretKeyRingFile=$FILE -Psonatype.username=$NAME -Psonatype.password=$PASS`
1. `signing` properties are related to signing information.
2. `sonatype` properties are your username and password from `oss.sonatype.org`.
3. `--no-parallel` is required to avoid creation of multiple staging repositories.
3. Create GitHub release with a tag name of the version and fill notes from pending changes section.
4. Cancel Release GitHub Action as it will fail now because version is already released.
5. Proceed to 'Closing staging repository'.

## Closing staging repository

1. Open `https://s01.oss.sonatype.org` and sign in with the sonatype credentials.
2. Click `Staging Repositories`.
3. Select the repository (assuming publish succeeded) and click the close button.
4. Select the repository again and click release.
This process should be used if there are issues with automatic publication.

1. Create a PR with the following changes:
1. Update the version in `gradle.properties`.
2. Create a new section with the version name, including all changes from the pending section.
2. Refer to [.github/workflows/release.yml](.github/workflows/release.yml) for the manual release process.
- Check the [vanniktech.github.io plugin documentation](https://vanniktech.github.io/gradle-maven-publish-plugin/central/#secrets) to learn how to use Gradle properties instead of environment variables.
3. Create a GitHub release with the version's tag name and fill in the release notes using the pending changes section.
4. Cancel the `Release` GitHub Action, as it will fail because the version has already been released.
5. [Proceed to closing the staging repository](#closing-staging-repository).

## Closing the Staging Repository

1. Open [Sonatype Central](https://central.sonatype.com/publishing) and sign in with the Sonatype credentials.
2. Click `Deployments` and then `Publish` once validated.

For more information, refer to [the official documentation](https://central.sonatype.org/publish/publish-portal-guide/#component-validation).
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.android.Version
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ junit-vintage = { module = "org.junit.vintage:junit-vintage-engine", version.ref
plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
plugin-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
plugin-android = { module = "com.android.tools.build:gradle", version.ref = "agp" }
plugin-publish = { module = "com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin", version = "0.31.0" }
plugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "2.0.0" }

detekt-compose = "io.nlopez.compose.rules:detekt:0.1.6"
toolargetool = "com.gu.android:toolargetool:0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion libraries/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
alias(libs.plugins.compose.compiler)
id("kotlin-android")
id("kotlin-parcelize")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
5 changes: 2 additions & 3 deletions libraries/customisations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import org.jetbrains.kotlin.config.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
id("java-library")
id("kotlin")
id("appyx-publish-java")
id("org.jetbrains.kotlin.jvm")
id("appyx-publish")
id("appyx-detekt")
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/interop-ribs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
alias(libs.plugins.compose.compiler)
id("kotlin-android")
id("kotlin-parcelize")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/interop-rx2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.config.JvmTarget
plugins {
id("com.android.library")
id("kotlin-android")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/interop-rx3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.config.JvmTarget
plugins {
id("com.android.library")
id("kotlin-android")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/testing-junit4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("com.android.library")
alias(libs.plugins.compose.compiler)
id("kotlin-android")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/testing-junit5/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("com.android.library")
alias(libs.plugins.compose.compiler)
id("kotlin-android")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/testing-ui-activity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("com.android.library")
alias(libs.plugins.compose.compiler)
id("kotlin-android")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/testing-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("com.android.library")
alias(libs.plugins.compose.compiler)
id("kotlin-android")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/testing-unit-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("com.android.library")
alias(libs.plugins.compose.compiler)
id("kotlin-android")
id("appyx-publish-android")
id("appyx-publish")
id("appyx-lint")
id("appyx-detekt")
}
Expand Down
12 changes: 5 additions & 7 deletions plugins/publish-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ plugins {
dependencies {
implementation(libs.plugin.android)
implementation(libs.plugin.kotlin)
implementation(libs.plugin.publish)
implementation(libs.plugin.dokka)
}

java {
Expand All @@ -27,13 +29,9 @@ detekt {

gradlePlugin {
plugins {
create("appyx-publish-android") {
id = "appyx-publish-android"
implementationClass = "AndroidAppyxPublishPlugin"
}
create("appyx-publish-java") {
id = "appyx-publish-java"
implementationClass = "JavaAppyxPublishPlugin"
create("appyx-publish") {
id = "appyx-publish"
implementationClass = "PublishPlugin"
}
}
}

This file was deleted.

14 changes: 0 additions & 14 deletions plugins/publish-plugin/src/main/kotlin/JavaAppyxPublishPlugin.kt

This file was deleted.

Loading
Loading