Skip to content

Commit

Permalink
Update the play publish plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
klassm committed Oct 31, 2020
1 parent e24dcd4 commit eb6d5db
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release_beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
PWD="$(pwd)"
mkdir -p ~/.gradle
touch ~/.gradle/gradle.properties
P12_FILE="${PWD}/play-store.p12"
echo "${{ secrets.andFHEMPlayUploadP12Base64 }}" | base64 --decode > "${P12_FILE}"
RELEASE_JSON_FILE="${PWD}/play-store.json"
echo "${{ secrets.ANDFHEMPLAYUPLOADRELEASEBASE64JSON }}" | base64 --decode > "${RELEASE_JSON_FILE}"
echo "andFHEMReleaseStorePassword=${{ secrets.andFHEMReleaseStorePassword }}" >> ~/.gradle/gradle.properties
echo "andFHEMReleaseAliasPassword=${{ secrets.andFHEMReleaseAliasPassword }}" >> ~/.gradle/gradle.properties
echo "andFHEMGithubToken=${{ secrets.andFHEMGithubToken }}" >> ~/.gradle/gradle.properties
echo "andFHEMReleaseAccount=${{ secrets.andFHEMReleaseAccount }}" >> ~/.gradle/gradle.properties
echo "andFHEMReleaseP12=${P12_FILE}" >> ~/.gradle/gradle.properties
echo "andFHEMPlayServiceAccountCredentials=${RELEASE_JSON_FILE}" >> ~/.gradle/gradle.properties
cd andFHEM
git config user.email "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
PWD="$(pwd)"
mkdir -p ~/.gradle
touch ~/.gradle/gradle.properties
P12_FILE="${PWD}/play-store.p12"
echo "${{ secrets.andFHEMPlayUploadP12Base64 }}" | base64 --decode > "${P12_FILE}"
RELEASE_JSON_FILE="${PWD}/play-store.json"
echo "${{ secrets.ANDFHEMPLAYUPLOADRELEASEBASE64JSON }}" | base64 --decode > "${RELEASE_JSON_FILE}"
echo "andFHEMReleaseStorePassword=${{ secrets.andFHEMReleaseStorePassword }}" >> ~/.gradle/gradle.properties
echo "andFHEMReleaseAliasPassword=${{ secrets.andFHEMReleaseAliasPassword }}" >> ~/.gradle/gradle.properties
echo "andFHEMGithubToken=${{ secrets.andFHEMGithubToken }}" >> ~/.gradle/gradle.properties
echo "andFHEMReleaseAccount=${{ secrets.andFHEMReleaseAccount }}" >> ~/.gradle/gradle.properties
echo "andFHEMReleaseP12=${P12_FILE}" >> ~/.gradle/gradle.properties
echo "andFHEMPlayServiceAccountCredentials=${RELEASE_JSON_FILE}" >> ~/.gradle/gradle.properties
cd andFHEM
git config user.email "[email protected]"
Expand Down
16 changes: 7 additions & 9 deletions app/build-includes/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ def getNextVersion(version) {
}

play {
userFraction = 1.0
userFraction.set(1.0d)
def hasPlayServiceAccountCredentials = project.hasProperty('andFHEMPlayServiceAccountCredentials')
enabled.set(hasPlayServiceAccountCredentials)

if (hasPlayServiceAccountCredentials) {
serviceAccountCredentials.set(file(andFHEMPlayServiceAccountCredentials))
}
}

release {
Expand Down Expand Up @@ -112,11 +118,3 @@ def setNewReleaseVersion(value) {
}
}

if (project.hasProperty('andFHEMReleaseP12')) {
play.serviceAccountCredentials = file(andFHEMReleaseP12)
}
if (project.hasProperty('andFHEMReleaseAccount')) {
play.serviceAccountEmail = andFHEMReleaseAccount
}

play.enabled = play.serviceAccountCredentials != null && play.serviceAccountEmail != null
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ buildscript {
classpath(group = "co.riiid", name = "gradle-github-plugin", version = "0.4.2")
classpath(group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version = kotlinVersion)
classpath(group = "com.google.gms", name = "google-services", version = "4.3.4")
classpath(group = "com.github.triplet.gradle", name = "play-publisher", version = "2.7.5")
classpath(group = "com.github.triplet.gradle", name = "play-publisher", version = "3.0.0")
classpath(group = "org.jetbrains.kotlin", name = "kotlin-serialization", version = kotlinVersion)
classpath(group = "androidx.navigation", name = "navigation-safe-args-gradle-plugin", version = "2.3.1")
classpath(group = "com.google.firebase", name = "perf-plugin", version = "1.3.3")
Expand All @@ -57,7 +57,7 @@ val roomVersion = "2.2.5"

plugins {
id("net.researchgate.release") version "2.8.1"
id("com.android.application") version "4.0.1"
id("com.android.application") version "4.1.0"
kotlin("android").version("1.3.31")
kotlin("android.extensions").version("1.3.31")
kotlin("kapt").version("1.3.31")
Expand Down

0 comments on commit eb6d5db

Please sign in to comment.