fix: build warnings due to jvmTarget not set properly for KotlinCompile tasks

This commit is contained in:
Akash Yadav
2023-01-01 08:34:30 +05:30
parent 34e09dc0d4
commit 50fb3f4b17
3 changed files with 24 additions and 24 deletions
Binary file not shown.
+8 -7
View File
@@ -17,7 +17,6 @@
import com.android.build.gradle.BaseExtension
import com.itsaky.androidide.plugins.AndroidIDEPlugin
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
@@ -27,9 +26,11 @@ plugins {
alias(libs.plugins.kotlin) apply false
}
buildscript { dependencies { classpath("com.google.android.gms:oss-licenses-plugin:0.10.6")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21")
} }
buildscript {
dependencies {
classpath("com.google.android.gms:oss-licenses-plugin:0.10.6")
}
}
fun Project.configureBaseExtension() {
extensions.findByType(BaseExtension::class)?.run {
@@ -69,15 +70,15 @@ subprojects {
plugins.withId("com.android.application") { configureBaseExtension() }
plugins.withId("com.android.library") { configureBaseExtension() }
plugins.withType(JavaLibraryPlugin::class.java) {
plugins.withId("java-library") {
configure<JavaPluginExtension> {
sourceCompatibility = Versions.javaVersion
targetCompatibility = Versions.javaVersion
}
}
plugins.withId("kotlin-android") {
configure<KotlinAndroidProjectExtension> { jvmToolchain(Versions.javaVersionMajor) }
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = Versions.javaVersion.toString()
}
}
+16 -17
View File
@@ -1,19 +1,19 @@
/*
* This file is part of AndroidIDE.
*
* AndroidIDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AndroidIDE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
*/
* This file is part of AndroidIDE.
*
* AndroidIDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AndroidIDE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
*/
@file:Suppress("UnstableApiUsage")
@@ -27,9 +27,8 @@ plugins {
android { namespace = "com.itsaky.androidide.inflater" }
dependencies {
ksp(projects.annotationKsp)
implementation(libs.androidx.appcompat)
implementation(libs.common.kotlin)
implementation(libs.common.utilcode)