Skip to content

Commit dfa55b7

Browse files
committed
Migrate to Gradle Daemon toolchain.| #3207
1 parent 2509c32 commit dfa55b7

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

FlowCrypt/build.gradle.kts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
import com.android.build.api.artifact.SingleArtifact
88
import com.android.build.api.variant.ResValue
9-
import org.gradle.api.GradleException
10-
import java.io.File
119
import com.android.ddmlib.DdmPreferences
1210
import java.io.FileInputStream
1311
import java.text.SimpleDateFormat
@@ -32,6 +30,15 @@ if (propertiesFile.exists()) {
3230
keystoreProperties.load(FileInputStream(propertiesFile))
3331
}
3432

33+
kotlin {
34+
jvmToolchain(21)
35+
36+
compilerOptions {
37+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
38+
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
39+
}
40+
}
41+
3542
android {
3643
compileSdk = rootProject.extra["compileSdkVersion"] as Int
3744
namespace = "com.flowcrypt.email"
@@ -395,20 +402,6 @@ easylauncher {
395402
}
396403
}
397404

398-
java {
399-
toolchain {
400-
languageVersion.set(JavaLanguageVersion.of(21))
401-
}
402-
}
403-
404-
405-
kotlin {
406-
compilerOptions {
407-
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
408-
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
409-
}
410-
}
411-
412405
tasks.register("checkCorrectBranch") {
413406
if (!grgit.branch.current().name.equals("master")) {
414407
throw GradleException("Please use 'master' branch to generate a release build")
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
3+
# Contributors: denbond7
4+
#
5+
#This file is generated by updateDaemonJvm
6+
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/402983f310a88ac68b3e883c7c91c760/redirect
7+
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/e50b80b5a11d194a898bc3e6211b7c4b/redirect
8+
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/402983f310a88ac68b3e883c7c91c760/redirect
9+
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/e50b80b5a11d194a898bc3e6211b7c4b/redirect
10+
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/f257be9f04bfdf169051808541767806/redirect
11+
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/1dcbacacca32618bd21ec5465779ade1/redirect
12+
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/402983f310a88ac68b3e883c7c91c760/redirect
13+
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/e50b80b5a11d194a898bc3e6211b7c4b/redirect
14+
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1e91f45234d88a64dafb961c93ddc75a/redirect
15+
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/5a88b04b5e582b332d2e6bc12b45f1b9/redirect
16+
toolchainVersion=21

settings.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com
3-
* Contributors: DenBond7
3+
* Contributors: denbond7
44
*/
55

66
pluginManagement {
@@ -10,6 +10,9 @@ pluginManagement {
1010
gradlePluginPortal()
1111
}
1212
}
13+
plugins {
14+
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
15+
}
1316
dependencyResolutionManagement {
1417
repositories {
1518
google()

0 commit comments

Comments
 (0)