Skip to content

Commit

Permalink
fix: remove R8 minification on prereleases
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenwinch committed Feb 8, 2024
1 parent ff3b1b4 commit 4cb5845
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ jobs:
- name: Build release and prerelease
uses: gradle/gradle-command-action@v2
with:
arguments: :app:assembleRelease :app:assemblePrerelease
arguments: :app:assembleRelease :app:assemblePrerelease build androidSourcesJar

- name: Make JAR
uses: gradle/gradle-command-action@v2
with:
arguments: makeJar

- name: Sign release APK
uses: r0adkll/sign-android-release@v1
Expand Down Expand Up @@ -93,6 +98,8 @@ jobs:
files: |
flixclusive-release.apk
flixclusive-prerelease.apk
app/build/libs/app-sources.jar
app/build/classes.jar
draft: false
prerelease: true
env:
Expand Down
23 changes: 22 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand All @@ -47,6 +47,9 @@ android {

getByName("prerelease") {
initWith(getByName("release"))
isMinifyEnabled = false
isShrinkResources = false

applicationIdSuffix = ".pre_release"
versionNameSuffix = "-PRE_RELEASE"

Expand All @@ -66,6 +69,12 @@ android {
}
}

testOptions {
unitTests.all {
it.ignoreFailures = true
}
}

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down Expand Up @@ -123,4 +132,16 @@ dependencies {
implementation(libs.hilt.navigation)
implementation(libs.lifecycle.runtimeCompose)
implementation(libs.material)
}

tasks.register("androidSourcesJar", Jar::class) {
archiveClassifier.set("sources")
from(android.sourceSets.getByName("main").java.srcDirs) // Full Sources
}

// For GradLew Plugin
tasks.register("makeJar", Copy::class) {
from("build/intermediates/compile_app_classes_jar/prerelease")
into("build")
include("classes.jar")
}

0 comments on commit 4cb5845

Please sign in to comment.