Skip to content

Commit

Permalink
Merge branch 'maven'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivchar Vitaly committed Jul 20, 2024
2 parents d5fb700 + 7b68d47 commit aadcb35
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ on:
push:
branches:
- master

env:
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
SECRET_PASSPHRASE: ${{ secrets.SECRET_PASSPHRASE }}
SIGNING_KEYID: ${{ secrets.SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_CONTENT: ${{ secrets.SIGNING_SECRET_KEY_RING_CONTENT }}
SIGNING_SECRET_PASSPHRASE: ${{ secrets.SIGNING_SECRET_PASSPHRASE }}

jobs:
build:
publish:
runs-on: ubuntu-latest

steps:
Expand All @@ -25,13 +26,13 @@ jobs:
distribution: 'adopt'
java-version: '17'

- name: Prepare environment
- name: Prepare environment # https://habr.com/ru/articles/490604/
run: |
echo '$SIGNING_SECRET_KEY_RING_CONTENT' | base64 -d > publish_key.gpg
gpg --quiet --batch --yes --decrypt --passphrase="$SECRET_PASSPHRASE" --output secret.gpg publish_key.gpg
echo "$SIGNING_SECRET_KEY_RING_CONTENT" | base64 -d > publish_key.gpg
gpg --batch --yes --decrypt --passphrase="$SIGNING_SECRET_PASSPHRASE" --output secret.gpg publish_key.gpg
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Publish with gradle
run: ./gradlew publish -Psigning.secretKeyRingFile=secret.gpg -Psigning.keyId=$SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -Ptoken="$TOKEN"
- name: Publish with Gradle
run: ./gradlew publish -Psigning.secretKeyRingFile=../secret.gpg -Psigning.keyId=$SIGNING_KEYID -Psigning.password=$SIGNING_PASSWORD -Ptoken="$SONATYPE_TOKEN"
19 changes: 18 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,21 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.android.kotlin) apply false
}
// alias(libs.plugins.nexus.plugin)
}

/**
* ./gradlew publishReleasePublicationToSonatypeRepository -Ptoken="token"
* ./gradlew findSonatypeStagingRepository closeSonatypeStagingRepository -Ptoken="token"
* */
//nexusPublishing {
// repositories {
// sonatype {
// group = "com.github.vivchar" /* for filters by description */
// version = "3.0.2" /* for filters by description */
// packageGroup = "com.github.vivchar"
// username = "Ud8EE3UN"
// password = findProperty("token") as String?
// }
// }
//}
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ appcompat = "1.7.0"
plugin-application = "8.5.1"
plugin-library = "8.5.1"
plugin-kotlin = "1.9.0"
plugin-nexus = "2.0.0"

kotlinVersion = "1.9.24"

Expand Down Expand Up @@ -58,4 +59,5 @@ glide-transformations = { group = "jp.wasabeef", name = "glide-transformations",
[plugins]
android-kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "plugin-kotlin" }
android-application = { id = "com.android.application", version.ref = "plugin-application" }
android-library = { id = "com.android.library", version.ref = "plugin-library" }
android-library = { id = "com.android.library", version.ref = "plugin-library" }
nexus-plugin = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "plugin-nexus" }
6 changes: 3 additions & 3 deletions rendererrecyclerviewadapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ android {
defaultConfig {
minSdk = libs.versions.minSdkVersion.get().toInt()
compileSdk = libs.versions.compileSdkVersion.get().toInt()
version = "3.0.2"
// version = "3.0.2-SNAPSHOT"
}

buildTypes {
Expand All @@ -36,7 +34,7 @@ dependencies {
}

signing {
sign(publishing.publications["release"])
sign(publishing.publications)
}

/**
Expand All @@ -53,6 +51,8 @@ publishing {

groupId = "com.github.vivchar"
artifactId = "RendererRecyclerViewAdapter"
version = "3.0.2"
// version = "3.0.2-SNAPSHOT"

pom {
packaging = "aar"
Expand Down

0 comments on commit aadcb35

Please sign in to comment.