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
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [develop, main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Assemble, test and lint
run: ./gradlew assembleDebug test ktlintCheck lint --stacktrace

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports
path: |
**/build/reports/tests/
**/build/reports/lint-results-*.html
if-no-files-found: ignore
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Publish to Maven Central
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE_BASE64: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE_BASE64 }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
echo "$SIGNING_SECRET_KEY_RING_FILE_BASE64" | base64 --decode > "$RUNNER_TEMP/secring.gpg"
./gradlew publishToMavenCentral --no-configuration-cache --stacktrace \
"-Psigning.keyId=$SIGNING_KEY_ID" \
"-Psigning.password=$SIGNING_PASSWORD" \
"-Psigning.secretKeyRingFile=$RUNNER_TEMP/secring.gpg"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Awesome App Rating

[![Build Status](https://app.bitrise.io/app/3156ba39c3e19393/status.svg?token=xXPr-IjWuLLKVliX5QPZKg&branch=develop)](https://app.bitrise.io/app/3156ba39c3e19393)
[![CI](https://github.com/SuddenH4X/awesome-app-rating/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/SuddenH4X/awesome-app-rating/actions/workflows/ci.yml)

A highly customizable Android library providing a dialog, which asks the user to rate the app. If the user rates below the defined threshold, the dialog will show a feedback form or ask the user to mail his feedback. Otherwise it will ask the user to rate the app in the Google Play Store.

Expand Down
4 changes: 1 addition & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
apply(from = "${rootDir}/scripts/publish-root.gradle")

plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.gradle.nexus.publish)
alias(libs.plugins.jlleitschuh.gradle.ktlint) apply false
alias(libs.plugins.kotlin.compose.compiler) apply false
alias(libs.plugins.vanniktech.maven.publish) apply false
}

buildscript {
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ compileSdk = "36"
jvmToolchain = "21"
kotlin = "2.3.21"
minSdk = "23"
targetSdk = "35"
targetSdk = "36"

androidxActivityCompose = "1.13.0"
androidxAnnotation = "1.10.0"
Expand All @@ -14,8 +14,8 @@ androidxConstraintlayout = "2.2.1"
androidxCore = "1.16.0" # Don't upgrade to 1.17.0 or higher because of compileSdk 36 requirement
googleMaterial = "1.14.0"
googlePlayReview = "2.0.2"
gradleNexusPublish = "2.0.0"
ktlint = "14.2.0"
vanniktechMavenPublish = "0.36.0"

# Dependencies for testing
mannodermausJunit5 = "2.0.1"
Expand Down Expand Up @@ -47,7 +47,7 @@ testing-mockk = { module = "io.mockk:mockk", version.ref = "testingMockk" }
[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
gradle-nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "gradleNexusPublish" }
jlleitschuh-gradle-ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
mannodermaus-android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "mannodermausJunit5" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish" }
58 changes: 33 additions & 25 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id(libs.plugins.android.library.get().pluginId)
alias(libs.plugins.mannodermaus.android.junit5)
alias(libs.plugins.jlleitschuh.gradle.ktlint)
alias(libs.plugins.vanniktech.maven.publish)
}

val version = "2.8.0"
Expand Down Expand Up @@ -38,11 +39,6 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

// Workaround for https://github.com/gradle-nexus/publish-plugin/issues/208
publishing {
singleVariant("release")
}
}

dependencies {
Expand All @@ -68,24 +64,36 @@ afterEvaluate {
}
}

ext {
set("PUBLISH_GROUP_ID", "com.suddenh4x.ratingdialog")
set("PUBLISH_VERSION", version)
set("PUBLISH_ARTIFACT_ID", "awesome-app-rating")
set(
"PUBLISH_DESCRIPTION",
"A highly customizable Android library providing a dialog, which asks the user to rate the app or give feedback. You can also use the" +
"library to show the Google in-app review easily under certain conditions.",
)
set("PUBLISH_URL", "https://github.com/SuddenH4X/awesome-app-rating")
set("PUBLISH_LICENSE_NAME", "Apache License")
set("PUBLISH_LICENSE_URL", "https://github.com/SuddenH4X/awesome-app-rating/blob/master/LICENSE")
set("PUBLISH_DEVELOPER_ID", "SuddenH4X")
set("PUBLISH_DEVELOPER_NAME", "Sascha Kühne")
set("PUBLISH_DEVELOPER_EMAIL", "SuddenH4X@users.noreply.github.com")
set("PUBLISH_SCM_CONNECTION", "scm:git:github.com/SuddenH4X/awesome-app-rating.git")
set("PUBLISH_SCM_DEVELOPER_CONNECTION", "scm:git:ssh://github.com:SuddenH4X/awesome-app-rating.git")
set("PUBLISH_SCM_URL", "https://github.com/SuddenH4X/awesome-app-rating/tree/master")
}
mavenPublishing {
publishToMavenCentral(automaticRelease = true)
Comment thread
SuddenH4X marked this conversation as resolved.
signAllPublications()

apply(from = "${rootProject.projectDir}/scripts/publish-module.gradle")
coordinates("com.suddenh4x.ratingdialog", "awesome-app-rating", version)

pom {
name.set("awesome-app-rating")
description.set(
"A highly customizable Android library providing a dialog, which asks the user to rate the app or give " +
"feedback. You can also use the library to show the Google in-app review easily under certain conditions.",
)
url.set("https://github.com/SuddenH4X/awesome-app-rating")
licenses {
license {
name.set("Apache License")
url.set("https://github.com/SuddenH4X/awesome-app-rating/blob/master/LICENSE")
}
}
developers {
developer {
id.set("SuddenH4X")
name.set("Sascha Kühne")
email.set("SuddenH4X@users.noreply.github.com")
}
}
scm {
url.set("https://github.com/SuddenH4X/awesome-app-rating/tree/master")
connection.set("scm:git:github.com/SuddenH4X/awesome-app-rating.git")
developerConnection.set("scm:git:ssh://github.com:SuddenH4X/awesome-app-rating.git")
}
}
}
77 changes: 0 additions & 77 deletions scripts/publish-module.gradle

This file was deleted.

36 changes: 0 additions & 36 deletions scripts/publish-root.gradle

This file was deleted.

Loading