Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions app/build.gradle.kts
Original file line numberDiff line numberDiff line change
Expand Up@@ -542,6 +542,11 @@ fun registerBundleLlamaAssetsTask(flavor: String, arch: String): TaskProvider<Ta
return tasks.register<Task>("bundle${capitalized}LlamaAssets") {
dependsOn("assemble${capitalized}Assets")

val assetsZipFile = project.layout.buildDirectory.file("outputs/assets/assets-$arch.zip")
val outputDir = rootProject.layout.projectDirectory.dir("assets/release/$flavor/dynamic_libs")
inputs.file(assetsZipFile)
outputs.dir(outputDir)

doLast {
val assetsZip =
project.layout.buildDirectory
Expand DownExpand Up@@ -620,11 +625,15 @@ fun registerBundleLlamaAssetsTask(flavor: String, arch: String): TaskProvider<Ta
}
}

tasks.register<Copy>("copyPluginApiJarToAssets") {
tasks.register("copyPluginApiJarToAssets") {
dependsOn(":plugin-api:createPluginApiJar")
from(project(":plugin-api").layout.buildDirectory.file("libs/plugin-api-1.0.0.jar"))
into(rootProject.file("assets"))
rename { "plugin-api.jar" }
val sourceFile = project(":plugin-api").layout.buildDirectory.file("libs/plugin-api-1.0.0.jar")
val destFile = rootProject.layout.projectDirectory.file("assets/plugin-api.jar")
inputs.file(sourceFile)
outputs.file(destFile)
doLast {
sourceFile.get().asFile.copyTo(destFile.asFile, overwrite = true)
}
}

tasks.register<Zip>("createPluginArtifactsZip") {
Expand DownExpand Up@@ -692,6 +701,13 @@ val isCiCd = System.getenv("GITHUB_ACTIONS") == "true"
val noCompress = setOf("so", "ogg", "mp3", "mp4", "zip", "jar", "ttf", "otf", "br")

afterEvaluate {
tasks.matching { it.name.contains("V8") && it.name.lowercase().contains("lint") }.configureEach {
dependsOn(bundleLlamaV8Assets)
}
tasks.matching { it.name.contains("V7") && it.name.lowercase().contains("lint") }.configureEach {
dependsOn(bundleLlamaV7Assets)
}

tasks.named("assembleV8Release").configure {
finalizedBy("recompressApk")

Expand Down