fix: update AGP and builder-model API to v8.1.0 (fixes #1192)

This commit is contained in:
Akash Yadav
2023-08-10 16:56:08 +05:30
parent bae6e34d20
commit 79b7cc1083
5 changed files with 13 additions and 31 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
[versions]
agp = "8.0.2"
agp-tooling = "8.0.2"
agp = "8.1.0"
agp-tooling = "8.1.0"
gradle-tooling = "8.1.1"
kotlin = "1.8.21"
tree-sitter = "3.2.0"
@@ -27,6 +27,9 @@ class DefaultLibrary : Library, Serializable {
private val serialVersionUID = 1L
override var androidLibraryData: DefaultAndroidLibraryData? = null
override var artifact: File? = null
override var srcJar: File? = null
override var docJar: File? = null
override var samplesJar: File? = null
override var key: String = ""
override var libraryInfo: DefaultLibraryInfo? = null
override var lintJar: File? = null
@@ -1,27 +0,0 @@
/*
* 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/>.
*/
package com.itsaky.androidide.builder.model
import com.android.builder.model.v2.models.ModelBuilderParameter
import java.io.Serializable
/** @author Akash Yadav */
class DefaultModelBuilderParameter(override var variantName: String) :
ModelBuilderParameter, Serializable {
private val serialVersionUID = 1L
}
@@ -51,7 +51,10 @@ class AndroidProjectModelBuilder(androidVariant: String) :
log("Selected build variant '$selectedVariant' for project '$projectpath'")
val variantDependencies = controller.getModelAndLog(module, VariantDependencies::class.java,
ModelBuilderParameter::class.java) { it.variantName = selectedVariant }
ModelBuilderParameter::class.java) {
it.variantName = selectedVariant
it.dontBuildRuntimeClasspath = false
}
return AndroidProjectImpl(
module.gradleProject,
@@ -270,7 +270,7 @@ object AndroidModulePropertyCopier {
}
this.compileDependencies = copy(artifact.compileDependencies)
this.runtimeDependencies = copy(artifact.runtimeDependencies)
this.runtimeDependencies = copy(artifact.runtimeDependencies ?: emptyList())
this.unresolvedDependencies = copy(artifact.unresolvedDependencies)
}
@@ -284,6 +284,9 @@ object AndroidModulePropertyCopier {
@JvmName("copyGraphItems")
fun copy(graphs: List<GraphItem>): List<DefaultGraphItem> {
if (graphs.isEmpty()) {
return emptyList()
}
return graphs.map { copy(it) }
}