Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import com.itsaky.androidide.build.config.BuildConfig
import com.itsaky.androidide.desugaring.utils.JavaIOReplacements.applyJavaIOReplacements
import com.itsaky.androidide.plugins.AndroidIDEAssetsPlugin
import org.adfa.constants.GRADLE_API_NAME_JAR_BR
import org.adfa.constants.GRADLE_API_NAME_JAR_ZIP
import org.adfa.constants.GRADLE_DISTRIBUTION_ARCHIVE_NAME
import org.json.JSONObject
import java.io.BufferedOutputStream
import java.io.ByteArrayInputStream
Expand Down Expand Up @@ -552,8 +555,8 @@ fun createAssetsZip(arch: String) {
arrayOf(
androidSdkName,
"localMvnRepository.zip",
"gradle-8.14.3-bin.zip",
"gradle-api-8.14.3.jar.zip",
"$GRADLE_DISTRIBUTION_ARCHIVE_NAME",
"$GRADLE_API_NAME_JAR_ZIP",
"documentation.db",
bootstrapName,
"plugin-artifacts.zip",
Expand Down Expand Up @@ -1197,15 +1200,15 @@ val debugAssets =
"debug",
),
Asset(
"assets/gradle-8.14.3-bin.zip",
"https://appdevforall.org/dev-assets/debug/gradle-8.14.3-bin.zip",
"gradle-8.14.3-bin.zip",
"assets/$GRADLE_DISTRIBUTION_ARCHIVE_NAME",
"https://appdevforall.org/dev-assets/debug/$GRADLE_DISTRIBUTION_ARCHIVE_NAME",
"$GRADLE_DISTRIBUTION_ARCHIVE_NAME",
"debug",
),
Asset(
"assets/gradle-api-8.14.3.jar.zip",
"https://appdevforall.org/dev-assets/debug/gradle-api-8.14.3.jar.zip",
"gradle-api-8.14.3.jar.zip",
"assets/$GRADLE_API_NAME_JAR_ZIP",
"https://appdevforall.org/dev-assets/debug/$GRADLE_API_NAME_JAR_ZIP",
"$GRADLE_API_NAME_JAR_ZIP",
"debug",
),
Asset(
Expand All @@ -1225,15 +1228,15 @@ val debugAssets =
val releaseAssets =
listOf(
Asset(
"assets/release/common/data/common/gradle-8.14.3-bin.zip.br",
"https://appdevforall.org/dev-assets/release/gradle-8.14.3-bin.zip.br",
"gradle-8.14.3-bin.zip.br",
"assets/release/common/data/common/$GRADLE_DISTRIBUTION_ARCHIVE_NAME.br",
"https://appdevforall.org/dev-assets/release/$GRADLE_DISTRIBUTION_ARCHIVE_NAME.br",
"$GRADLE_DISTRIBUTION_ARCHIVE_NAME.br",
"release",
),
Asset(
"assets/release/common/data/common/gradle-api-8.14.3.jar.br",
"https://appdevforall.org/dev-assets/release/gradle-api-8.14.3.jar.br",
"gradle-api-8.14.3.jar.br",
"assets/release/common/data/common/$GRADLE_API_NAME_JAR_BR",
"https://appdevforall.org/dev-assets/release/$GRADLE_API_NAME_JAR_BR",
"$GRADLE_API_NAME_JAR_BR",
"release",
),
Asset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

package org.adfa.constants

const val ANDROID_GRADLE_PLUGIN_VERSION = "8.11.0"
const val GRADLE_DISTRIBUTION_VERSION = "8.14.3"
const val KOTLIN_VERSION = "1.9.22"
const val ANDROID_GRADLE_PLUGIN_VERSION = "9.3.1"
const val GRADLE_DISTRIBUTION_VERSION = "9.6.1"
const val KOTLIN_VERSION = "2.3.21"

val TARGET_SDK_VERSION = Sdk.Baklava
val COMPILE_SDK_VERSION = Sdk.Baklava
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
activityKtx = "1.8.2"
agp = "8.8.2"
agp-tooling = "8.11.0"
agp-tooling = "9.3.1"
androidx-sqlite = "2.6.2"
appcompatVersion = "1.7.1"
colorpickerview = "2.3.0"
Expand Down Expand Up @@ -291,6 +291,7 @@ tests-junit-kts = { module = "androidx.test.ext:junit-ktx", version = "1.2.1" }
tests-kotlinx-coroutines = {module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesCore"}

# Tooling
tooling-agp = { module = "com.android.tools.build:gradle", version.ref = "agp-tooling" }
tooling-builderModel = { module = "com.android.tools.build:builder-model", version.ref = "agp-tooling" }
tooling-gradleApi = { module = "com.itsaky.androidide.gradle:gradle-tooling-api", version.ref = "gradle-tooling" }
tooling-slf4j = { module = "org.slf4j:slf4j-api", version = "2.0.12" }
Expand Down
6 changes: 3 additions & 3 deletions plugin-api/plugin-builder/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ version = "1.0.0"

dependencies {
// AGP is provided at runtime by the plugin project's own `com.android.application`,
// and on-device plugin builds use the tooling AGP (`agp-tooling` = 8.11.0), which is
// what the harvested localMvnRepository ships. Keep it compileOnly so the published
// and on-device plugin builds use the tooling AGP (`agp-tooling`), which is what
// the harvested localMvnRepository ships. Keep it compileOnly so the published
// POM stays dependency-free: forcing it as a transitive would make the coordinate
// unresolvable offline whenever the harvested AGP differs from a pinned version.
compileOnly("com.android.tools.build:gradle:8.11.0")
compileOnly(libs.tooling.agp)
}

gradlePlugin {
Expand Down
18 changes: 12 additions & 6 deletions plugin-api/plugin-builder/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
rootProject.name = "plugin-builder"

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
}

versionCatalogs {
create("libs") {
from(files("../../gradle/libs.versions.toml"))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ enum class StringOption(
IDE_ANDROID_CUSTOM_CLASS_TRANSFORMS("android.advanced.profiling.transforms", ApiStage.Stable),

// The exact version of Android Support plugin used, e.g. 2.4.0.6
IDE_ANDROID_STUDIO_VERSION(AndroidProject.PROPERTY_ANDROID_SUPPORT_VERSION, ApiStage.Stable),
// AGP 9 removed AndroidProject.PROPERTY_ANDROID_SUPPORT_VERSION; its value is inlined.
IDE_ANDROID_STUDIO_VERSION("android.injected.studio.version", ApiStage.Stable),

// The version of Android Game Development Extension used to orchestrate the build
IDE_AGDE_VERSION("agde.version", ApiStage.Stable),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
/*
* 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.ide.AndroidArtifact
import com.android.builder.model.v2.ide.BytecodeTransformation
import com.android.builder.model.v2.ide.CodeShrinker
import com.android.builder.model.v2.ide.PrivacySandboxSdkInfo
import java.io.File
import java.io.Serializable

/** @author Akash Yadav */
class DefaultAndroidArtifact : AndroidArtifact, Serializable {

private val serialVersionUID = 1L
override var applicationId: String? = ""
override var resGenTaskName: String? = null
override var abiFilters: Set<String>? = null
override var assembleTaskOutputListingFile: File? = null
override var bundleInfo: DefaultBundleInfo? = null
override var codeShrinker: CodeShrinker? = null
override var generatedResourceFolders: Collection<File> = emptyList()
override var isSigned: Boolean = false
override var maxSdkVersion: Int? = null
override var minSdkVersion: DefaultApiVersion = DefaultApiVersion()
override var signingConfigName: String? = null
override var sourceGenTaskName: String = ""
override var testInfo: DefaultTestInfo? = null
override var assembleTaskName: String = ""
override var classesFolders: Set<File> = emptySet()
override var compileTaskName: String = ""
override var generatedSourceFolders: Collection<File> = emptyList()
override var ideSetupTaskNames: Set<String> = emptySet()
override var targetSdkVersionOverride: DefaultApiVersion? = null
override var modelSyncFiles: Collection<Void> = emptyList()
override var privacySandboxSdkInfo: PrivacySandboxSdkInfo? = null
override var desugaredMethodsFiles: Collection<File> = emptyList()
override val generatedClassPaths: Map<String, File> = emptyMap()
override val generatedAssetsFolders: Collection<File> = emptyList()
override val bytecodeTransformations: Collection<BytecodeTransformation> = emptyList()
}
/*
* 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.ide.AndroidArtifact
import com.android.builder.model.v2.ide.BytecodeTransformation
import com.android.builder.model.v2.ide.CodeShrinker
import java.io.File
import java.io.Serializable

/** @author Akash Yadav */
class DefaultAndroidArtifact :
AndroidArtifact,
Serializable {
private val serialVersionUID = 1L
override var applicationId: String? = ""
override var resGenTaskName: String? = null
override var abiFilters: Set<String>? = null
override var assembleTaskOutputListingFile: File? = null
override var bundleInfo: DefaultBundleInfo? = null
override var codeShrinker: CodeShrinker? = null
override var generatedResourceFolders: Collection<File> = emptyList()
override var isSigned: Boolean = false
override var maxSdkVersion: Int? = null
override var minSdkVersion: DefaultApiVersion = DefaultApiVersion()
override var signingConfigName: String? = null
override var sourceGenTaskName: String = ""
override var testInfo: DefaultTestInfo? = null
override var assembleTaskName: String = ""
override var classesFolders: Set<File> = emptySet()
override var compileTaskName: String = ""
override var generatedSourceFolders: Collection<File> = emptyList()
override var ideSetupTaskNames: Set<String> = emptySet()
override var targetSdkVersionOverride: DefaultApiVersion? = null
override var modelSyncFiles: Collection<Void> = emptyList()
override var desugaredMethodsFiles: Collection<File> = emptyList()
override val generatedClassPaths: Map<String, File> = emptyMap()
override val generatedAssetsFolders: Collection<File> = emptyList()
override val bytecodeTransformations: Collection<BytecodeTransformation> = emptyList()
override val mappingR8TextFile: File? = null
override val mappingR8PartitionFile: File? = null
}
Original file line number Diff line number Diff line change
@@ -1,44 +1,49 @@
/*
* 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.ide.SourceProvider
import java.io.File
import java.io.Serializable

/** @author Akash Yadav */
class DefaultSourceProvider() : SourceProvider, Serializable {
private val serialVersionUID = 1L
override var aidlDirectories: Collection<File>? = null
override var assetsDirectories: Collection<File>? = null
override var customDirectories: Collection<DefaultCustomSourceDirectory>? = null
override var javaDirectories: Collection<File> = emptyList()
override var jniLibsDirectories: Collection<File> = emptyList()
override var kotlinDirectories: Collection<File> = emptyList()
override var manifestFile: File? = NoFile
override var mlModelsDirectories: Collection<File>? = null
override var name: String = ""
override var renderscriptDirectories: Collection<File>? = null
override var resDirectories: Collection<File>? = null
override var resourcesDirectories: Collection<File> = emptyList()
override var shadersDirectories: Collection<File>? = null
override var baselineProfileDirectories: Collection<File>? = null

companion object {
@JvmStatic val NoFile = File("<does-not-exist>")
}
}
/*
* 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.ide.SourceProvider
import java.io.File
import java.io.Serializable

/** @author Akash Yadav */
class DefaultSourceProvider :
SourceProvider,
Serializable {
private val serialVersionUID = 1L
override var aidlDirectories: Collection<File>? = null
override var assetsDirectories: Collection<File>? = null
override var customDirectories: Collection<DefaultCustomSourceDirectory>? = null
override var javaDirectories: Collection<File> = emptyList()
override var jniLibsDirectories: Collection<File> = emptyList()
override var kotlinDirectories: Collection<File> = emptyList()
override var manifestFile: File? = NoFile
override var mlModelsDirectories: Collection<File>? = null
override var name: String = ""
override var renderscriptDirectories: Collection<File>? = null
override var resDirectories: Collection<File>? = null
override var resourcesDirectories: Collection<File> = emptyList()
override var shadersDirectories: Collection<File>? = null
override var baselineProfileDirectories: Collection<File>? = null

companion object {
@JvmStatic val NoFile = File("<does-not-exist>")
}

override val keepRulesDirectories: Collection<File>? = null
override val aarKeepRulesDirectories: Collection<File>? = null
}
Loading
Loading