Skip to content

Commit

Permalink
Try to fix Fdroid Build
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrave-dev committed Aug 10, 2024
1 parent 573f938 commit 3bee370
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
13 changes: 10 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs = freeCompilerArgs + "-Xcontext-receivers"
jvmTarget = "17"
}
// enable view binding
buildFeatures {
Expand Down Expand Up @@ -293,6 +298,8 @@ dependencies {
implementation(libs.landscapist.transformation)
// InsetsX
implementation(libs.insetsx)

coreLibraryDesugaring(libs.desugaring)
}
hilt {
enableAggregatingTask = true
Expand Down
24 changes: 23 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
Expand All @@ -9,4 +11,24 @@ plugins {
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.aboutlibraries) apply false
}
}

tasks.register<Delete>("Clean") {
delete(rootProject.layout.buildDirectory)
}

subprojects {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
if (project.findProperty("enableComposeCompilerReports") == "true") {
arrayOf("reports", "metrics").forEach {
freeCompilerArgs.addAll(
listOf(
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:${it}Destination=${layout.buildDirectory.asFile.get().absolutePath}/compose_metrics"
)
)
}
}
}
}
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ insetsx = "0.1.0-alpha10"
ktor = "2.3.12"
brotli = "0.1.2"
ksoup = "0.3.1"
desugaring = "2.0.4"

[libraries]
desugaring = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "desugaring"}
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
compose-material3-lib = { group = "androidx.compose.material3", name = "material3" }
compose-ui = { group = "androidx.compose.ui", name = "ui" }
Expand Down
8 changes: 2 additions & 6 deletions kotlinYtmusicScraper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ android {
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
kotlin {
jvmToolchain(17)
}
packaging {
jniLibs.useLegacyPackaging = true
Expand Down

0 comments on commit 3bee370

Please sign in to comment.