diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 90c03a3fb..7eb338315 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -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 @@ -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: diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 18563422a..c00c5d973 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -38,7 +38,7 @@ android { buildTypes { release { isMinifyEnabled = true - isShrinkResources = true + isShrinkResources = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" @@ -47,6 +47,9 @@ android { getByName("prerelease") { initWith(getByName("release")) + isMinifyEnabled = false + isShrinkResources = false + applicationIdSuffix = ".pre_release" versionNameSuffix = "-PRE_RELEASE" @@ -66,6 +69,12 @@ android { } } + testOptions { + unitTests.all { + it.ignoreFailures = true + } + } + packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" @@ -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") } \ No newline at end of file