Updated build again

This commit is contained in:
Benjamin Halko 2024-01-23 12:02:56 -08:00
parent 197465924f
commit d047ae97ee
No known key found for this signature in database
GPG Key ID: 790C70040EB331A0
3 changed files with 13 additions and 16 deletions

View File

@ -29,8 +29,12 @@ jobs:
- name: Build with Gradle
run: ./gradlew assembleRelease --no-daemon -PnoProguard
- name: Get commit hash
id: get_commit_hash
run: echo "::set-output name=hash::$(git rev-parse --short HEAD)"
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: revanced-manager
name: revanced-manager-${{ steps.get_commit_hash.outputs.hash }}
path: app/build/outputs/apk/release/*.apk

View File

@ -30,7 +30,7 @@
{
"assets": [
{
"path": "app/build/outputs/apk/release/*.apk"
"path": "app/build/outputs/apk/release/revanced-manager*.apk"
}
],
"successComment": false

View File

@ -33,7 +33,6 @@ android {
release {
val hasReleaseConfig = (System.getenv("KEYSTORE_FILE") != null)
var suffix = "v${project.version}"
if (hasReleaseConfig) {
signingConfigs {
create("release") {
@ -44,29 +43,23 @@ android {
}
}
signingConfig = signingConfigs.getByName("release")
applicationVariants.all {
this.outputs
.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
.forEach { output ->
output.outputFileName = "revanced-manager-v${project.version}.apk"
}
}
} else {
applicationIdSuffix = ".debug"
resValue("string", "app_name", "ReVanced Manager Debug")
signingConfig = signingConfigs.getByName("debug")
val os = org.apache.commons.io.output.ByteArrayOutputStream()
project.exec {
commandLine = "git rev-parse --short HEAD".split(" ")
standardOutput = os
}
suffix = String(os.toByteArray()).trim()
}
if (!project.hasProperty("noProguard")) {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
applicationVariants.all {
this.outputs
.map { it as com.android.build.gradle.internal.api.BaseVariantOutputImpl }
.forEach { output ->
output.outputFileName = "revanced-manager-${suffix}.apk"
}
}
}
}