Set Java version with Gradle toolchain
Java version should be consistent for all tasks "It has been possible to configure Gradle to build a project with a different Java version than the one used to run Gradle. However, it has required configuring each task like compilation, test, and javadoc separately. Gradle 6.7 introduces “Java toolchain support”. In a nutshell, it allows you to run Gradle with whatever version of Java you have installed, while Gradle builds the project with the version of Java declared in a single place. Gradle will automatically configure the build, detect already installed JDKs and download the required JDK if it is not already installed." More at https://blog.gradle.org/java-toolchains Signed-off-by: Patryk Mis <foss@patrykmis.com>
This commit is contained in:
@@ -39,6 +39,12 @@ project.ext {
|
||||
]
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(11))
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.aurora.store'
|
||||
compileSdk 33
|
||||
|
||||
Reference in New Issue
Block a user