diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 7eb338315..bad68c9a2 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -34,15 +34,10 @@ jobs: java-version: 17 distribution: adopt - - name: Build release and prerelease + - name: Build release artifacts uses: gradle/gradle-command-action@v2 with: - arguments: :app:assembleRelease :app:assemblePrerelease build androidSourcesJar - - - name: Make JAR - uses: gradle/gradle-command-action@v2 - with: - arguments: makeJar + arguments: :app:assembleRelease :app:assemblePrerelease makeJar fatJar - name: Sign release APK uses: r0adkll/sign-android-release@v1 @@ -85,6 +80,9 @@ jobs: ### Changes + ### Known issues + - TV focus crashes. Compose TV is bugged af; we wait til the new update. + --- ##### The `prerelease` apk is similar to release but for _debugging_ purposes only. Use this if you want to test the latest features without messing up your authentic release data. --- @@ -98,7 +96,7 @@ jobs: files: | flixclusive-release.apk flixclusive-prerelease.apk - app/build/libs/app-sources.jar + app/build/libs/fat-sources.jar app/build/classes.jar draft: false prerelease: true diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ea2c80d36..370ce1f2a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -128,14 +128,12 @@ dependencies { implementation(libs.material) } -tasks.register("androidSourcesJar", Jar::class) { - archiveClassifier.set("sources") - from(android.sourceSets.getByName("main").java.srcDirs) // Full Sources -} - -// For GradLew Plugin +// Get the JAR classes for the plugins-system tasks.register("makeJar", Copy::class) { - from("build/intermediates/compile_app_classes_jar/prerelease") - into("build") - include("classes.jar") -} \ No newline at end of file + dependsOn("build") + doLast { + from("app/build/intermediates/compile_app_classes_jar/prerelease") + into("app/build") + include("classes.jar") + } +} diff --git a/build.gradle.kts b/build.gradle.kts index 97b12d9f9..d76fc09a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,3 +18,17 @@ plugins { alias(libs.plugins.room) apply false id("com.osacky.doctor") version "0.9.1" } + +// Generate a mf FAT AHH JAR! +tasks.register("fatJar") { + archiveBaseName.set("fat") + archiveClassifier.set("sources") + destinationDirectory.set(File("app/build/libs")) + + subprojects.forEach { project -> + if (project.subprojects.size == 0) { + val projectPath = "." + project.path.replace(":", "/") + from("$projectPath/src/main/kotlin", "$projectPath/src/main/java") + } + } +} \ No newline at end of file