-
-
Notifications
You must be signed in to change notification settings - Fork 4
Added GitHub actions for automated releases #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Publish | ||
| on: | ||
| release: | ||
| types: [released] | ||
| jobs: | ||
| publish: | ||
| name: Release build and publish | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'zulu' | ||
| java-version: 21 | ||
| - name: Publish to MavenCentral | ||
| run: ./gradlew publishToMavenCentral --no-configuration-cache | ||
| env: | ||
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | ||
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,4 +13,3 @@ | |
| .externalNativeBuild | ||
| .cxx | ||
| local.properties | ||
| /gradle.properties | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
|
|
||
| org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
|
|
||
| android.useAndroidX=true | ||
| kotlin.code.style=official | ||
| android.nonTransitiveRClass=true | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #Tue Jun 03 22:26:27 IST 2025 | ||
| #Thu Jul 10 22:22:40 IST 2025 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,7 +18,7 @@ plugins { | |||||||||||||||||||||||||||||||||||||||||
| alias(libs.plugins.kotlin.android) | ||||||||||||||||||||||||||||||||||||||||||
| alias(libs.plugins.kotlin.compose) | ||||||||||||||||||||||||||||||||||||||||||
| alias(libs.plugins.spotless) | ||||||||||||||||||||||||||||||||||||||||||
| id("com.vanniktech.maven.publish") version "0.32.0" | ||||||||||||||||||||||||||||||||||||||||||
| id("com.vanniktech.maven.publish") version "0.34.0" | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| android { | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -92,4 +92,41 @@ dependencies { | |||||||||||||||||||||||||||||||||||||||||
| implementation(libs.androidx.ui.graphics) | ||||||||||||||||||||||||||||||||||||||||||
| implementation(libs.androidx.ui.tooling.preview) | ||||||||||||||||||||||||||||||||||||||||||
| implementation(libs.androidx.material3) | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| mavenPublishing { | ||||||||||||||||||||||||||||||||||||||||||
| publishToMavenCentral() | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| signAllPublications() | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| coordinates("com.meticha", "triggerx", "0.0.9") | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+97
to
+104
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Hard-coding coordinates duplicates existing Gradle properties
- coordinates("com.meticha", "triggerx", "0.0.9")
+ // Re-use the project’s canonical values
+ coordinates(project.group.toString(), "triggerx", project.version.toString())This keeps the build single-sourced and avoids accidental mismatches between publishing and build metadata. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| pom { | ||||||||||||||||||||||||||||||||||||||||||
| name = "triggerx" | ||||||||||||||||||||||||||||||||||||||||||
| description = | ||||||||||||||||||||||||||||||||||||||||||
| "A lightweight Android library for scheduling exact alarms with custom UIs. No foreground services or wake-lock hassle." | ||||||||||||||||||||||||||||||||||||||||||
| inceptionYear = "2025" | ||||||||||||||||||||||||||||||||||||||||||
| version = "0.0.9" | ||||||||||||||||||||||||||||||||||||||||||
| url = "https://github.com/meticha/triggerx.git" | ||||||||||||||||||||||||||||||||||||||||||
| licenses { | ||||||||||||||||||||||||||||||||||||||||||
| license { | ||||||||||||||||||||||||||||||||||||||||||
| name = "The Apache License, Version 2.0" | ||||||||||||||||||||||||||||||||||||||||||
| url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||||||||||||||||||||||||||||||||||||||||||
| distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| developers { | ||||||||||||||||||||||||||||||||||||||||||
| developer { | ||||||||||||||||||||||||||||||||||||||||||
| id = "Cavin" | ||||||||||||||||||||||||||||||||||||||||||
| name = "Cavin Macwan" | ||||||||||||||||||||||||||||||||||||||||||
| url = "https://github.com/cavin-macwan/" | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| scm { | ||||||||||||||||||||||||||||||||||||||||||
| url = "https://github.com/meticha/triggerx.git" | ||||||||||||||||||||||||||||||||||||||||||
| connection = "scm:git:git://github.com/meticha/triggerx.git" | ||||||||||||||||||||||||||||||||||||||||||
| developerConnection = "scm:git:ssh://[email protected]/meticha/triggerx.git" | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid mixing version-catalog aliases with an explicit plugin declaration
Every other plugin is declared through the version-catalog (
alias(libs.plugins.…)), whereascom.vanniktech.maven.publishis hard-coded with a version string.Mixing the two styles makes upgrades easy to miss.
Add the plugin to
libs.versions.tomland keep all versions in a single place.🤖 Prompt for AI Agents