Skip to content

Commit

Permalink
fix: plugin/provider stubs not included on jar file
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenwinch committed Feb 9, 2024
1 parent 051b524 commit fa8b4a4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
---
Expand All @@ -98,7 +96,7 @@ jobs:
files: |
flixclusive-release.apk
flixclusive-prerelease.apk
app/build/libs/app-sources.jar
app/build/libs/Flixclusive-fat.jar
app/build/classes.jar
draft: false
prerelease: true
Expand Down
18 changes: 8 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,12 @@ dependencies {
implementation(libs.material)
}

tasks.register("androidSourcesJar", Jar::class) {
archiveClassifier.set("sources")
from("src/main/java", "src/main/kotlin")
}

// For the plugins-system
// 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")
}
dependsOn("build")
doLast {
from("app/build/intermediates/compile_app_classes_jar/prerelease")
into("app/build")
include("classes.jar")
}
}
14 changes: 14 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Jar>("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")
}
}
}

0 comments on commit fa8b4a4

Please sign in to comment.