1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-10-25 20:37:40 +00:00

Specify JDK toolchain directly

Specifying JDK toolchain in the java block lets us avoid specifying
same version again and again for different options while ensuring everything
is on the same version

Ref: https://developer.android.com/build/jdks#toolchain

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-10-17 16:25:51 +08:00
parent 1bef2fdc25
commit ee01ba3209

View File

@@ -18,6 +18,12 @@ val gitWorkingBranch = providers.exec {
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
}.standardOutput.asText.map { it.trim() }
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
android {
compileSdk = 36
namespace = "org.schabi.newpipe"
@@ -87,16 +93,9 @@ android {
compileOptions {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
encoding = "utf-8"
}
kotlinOptions {
jvmTarget = "17"
}
sourceSets {
getByName("androidTest") {
assets.srcDir("$projectDir/schemas")