Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f31cd59
migrated sv build architecture for toolkit project
shubham7109 Aug 13, 2025
8336077
Add all Toolkit convention migration changes
shubham7109 Aug 18, 2025
4d3079b
Abstract ArcGISMapsKotlinSDK dependency as a gradle object
shubham7109 Aug 18, 2025
e6c8f6b
Untangle dependencies and add PR feedback
shubham7109 Aug 19, 2025
4937ba9
vTest build fixes
shubham7109 Aug 19, 2025
95b23fc
Add automatic detection of androidTest sources
shubham7109 Aug 19, 2025
483cabb
working changes
shubham7109 Sep 14, 2025
ae445df
Merge branch 'v.next' into shubham/migrate-convention-plugins
shubham7109 Sep 18, 2025
af0dde4
Add v.next build fixes
shubham7109 Sep 18, 2025
fb8710e
add Toolkit version provider and module registry
shubham7109 Sep 24, 2025
bc6c542
Merge branch 'v.next' into shubham/migrate-convention-plugins
shubham7109 Sep 24, 2025
db71c5f
update toml, add root convention
shubham7109 Sep 25, 2025
9794995
Merge branch 'v.next' into shubham/migrate-convention-plugins
shubham7109 Sep 25, 2025
7621495
fix freeCompilerArgs warnings
shubham7109 Sep 25, 2025
d8eda36
Add MissingTranslation for popup
shubham7109 Sep 25, 2025
0b2ca36
Merge branch 'v.next' into toolkit/migrate-convention-plugins
shubham7109 Sep 26, 2025
4530c5f
Merge branch 'toolkit/migrate-convention-plugins' into shubham/migrat…
shubham7109 Sep 26, 2025
ea471ff
Migrate toolkit registry as a gradle service
shubham7109 Sep 29, 2025
edb7cc7
use expected gradle properties
shubham7109 Sep 29, 2025
04cacf5
add copyrights
shubham7109 Sep 30, 2025
7560805
Merge branch 'v.next' into shubham/migrate-convention-plugins
shubham7109 Oct 3, 2025
6879a2c
Supply mockingjay for lib androidTestImplementation
shubham7109 Oct 3, 2025
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
76 changes: 1 addition & 75 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,79 +17,5 @@
*/

plugins {
id("maven-publish")
id("java-platform")
alias(libs.plugins.arcgismaps.kotlin.bom.convention)
}

// Find these in properties passed through command line or read from GRADLE_HOME/gradle.properties
// or local gradle.properties
val artifactoryGroupId: String by project
val artifactoryArtifactBaseId: String by project
val artifactoryArtifactId: String = "$artifactoryArtifactBaseId-${project.name}"
val artifactoryUrl: String by project
val artifactoryUsername: String by project
val artifactoryPassword: String by project
val versionNumber: String by project
val buildNumber: String by project
val finalBuild: Boolean = (project.properties["finalBuild"] ?: "false")
.run { this == "true" }
val artifactVersion: String = if (finalBuild) {
versionNumber
} else {
"$versionNumber-$buildNumber"
}

// ensure that the evaluation of the bom project happens after all other projects
// so that plugins are applied to all projects, and can be used to identify
// which projects should get written into the BOM's pom file.
rootProject.subprojects.filter {
it.name != project.name
}.forEach {
evaluationDependsOn(":${it.name}")
}

// now find projects which are publishable based on their inclusion
// of the publishing plugin, and add them as api dependencies.
dependencies {
constraints {
project.rootProject.subprojects.filter {
it.plugins.findPlugin("artifact-deploy") != null
}.forEach { subproject ->
// add all the intended library projects as api dependencies.
api(subproject)
}
}
}

afterEvaluate {
/**
* Maven publication configuration for aar and pom file. Run as follows:
* ./gradlew publishAarPublicationToMavenRepository -PartifactoryUsername=<username> -PartifactoryPassword=<password>
*
* More details:
* https://docs.gradle.org/current/userguide/publishing_maven.html
*/
publishing {
publications {
create<MavenPublication>("bom") {
groupId = artifactoryGroupId
artifactId = artifactoryArtifactId
version = artifactVersion

from(components["javaPlatform"])
}
}

repositories {
maven {
url = uri(artifactoryUrl)
credentials {
username = artifactoryUsername
password = artifactoryPassword
}
}
}
}
}


2 changes: 2 additions & 0 deletions build-logic/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/.gradle
1 change: 1 addition & 0 deletions build-logic/convention/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
81 changes: 81 additions & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
}

group = "com.esri.arcgismaps.kotlin.build_logic.convention"

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

dependencies {
compileOnly(gradleApi())
compileOnly(libs.android.gradlePlugin)
compileOnly(libs.android.tools.common)
compileOnly(libs.kotlin.gradlePlugin)
compileOnly(libs.ksp.gradlePlugin)
compileOnly(libs.secrets.gradlePlugin)
implementation(libs.dokka.gradle.plugin)
}

tasks {
validatePlugins {
enableStricterValidation = true
failOnWarning = true
}
}

gradlePlugin {
plugins {
register("androidApplicationCompose") {
id = "arcgismaps.android.application.compose"
implementationClass = "AndroidApplicationComposeConventionPlugin"
}
register("androidApplication") {
id = "arcgismaps.android.application"
implementationClass = "AndroidApplicationConventionPlugin"
}
register("androidLibraryCompose") {
id = "arcgismaps.android.library.compose"
implementationClass = "AndroidLibraryComposeConventionPlugin"
}
register("androidLibrary") {
id = "arcgismaps.android.library"
implementationClass = "AndroidLibraryConventionPlugin"
}
register("arcgismapsKotlinToolkit") {
id = "arcgismaps.kotlin.toolkit"
implementationClass = "ArcGISMapsKotlinToolkitConventionPlugin"
}
register("arcgismapsKotlinMicroapp") {
id = "arcgismaps.kotlin.microapp"
implementationClass = "ArcGISMapsKotlinMicroappConventionPlugin"
}
register("arcGISMapsKotlinSDK") {
id = "arcgismaps.kotlin.sdk"
implementationClass = "ArcGISMapsKotlinSDKConventionPlugin"
}
register("arcGISMapsKdoc") {
id = "arcgismaps.kotlin.kdoc.convention"
implementationClass = "ArcGISMapsKdocConventionPlugin"
}
register("arcGISMapsBom") {
id = "arcgismaps.kotlin.bom.convention"
implementationClass = "ArcGISMapsBomConventionPlugin"
}
register("arcGISMapsRoot") {
id = "arcgismaps.kotlin.root.convention"
implementationClass = "ArcGISMapsRootConventionPlugin"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
*
* Copyright 2025 Esri
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

import com.android.build.api.dsl.ApplicationExtension
import com.esri.arcgismaps.kotlin.build_logic.convention.configureAndroidCompose
import com.esri.arcgismaps.kotlin.build_logic.convention.configureKotlinAndroid
import com.esri.arcgismaps.kotlin.build_logic.extensions.debugImplementation
import com.esri.arcgismaps.kotlin.build_logic.extensions.implementation
import com.esri.arcgismaps.kotlin.build_logic.extensions.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType

class AndroidApplicationComposeConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply(libs.findPlugin("android-application").get().get().pluginId)
apply(libs.findPlugin("kotlin-android").get().get().pluginId)
apply(libs.findPlugin("compose-compiler").get().get().pluginId)
}
val extension = extensions.getByType<ApplicationExtension>()
configureKotlinAndroid(extension)
configureAndroidCompose(extension)

// Add common Compose dependencies for application modules
dependencies {
implementation(platform(libs.findLibrary("androidx-compose-bom").get()))
implementation(libs.findBundle("composeCore").get())
implementation(libs.findBundle("core").get())
implementation(libs.findLibrary("androidx-activity-compose").get())
implementation(libs.findLibrary("androidx-lifecycle-viewmodel-compose").get())
debugImplementation(libs.findBundle("debug").get())
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
*
* Copyright 2025 Esri
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

import com.android.build.api.dsl.ApplicationExtension
import com.esri.arcgismaps.kotlin.build_logic.convention.configureKotlinAndroid
import com.esri.arcgismaps.kotlin.build_logic.extensions.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure

class AndroidApplicationConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply(libs.findPlugin("android-application").get().get().pluginId)
apply(libs.findPlugin("kotlin-android").get().get().pluginId)
}

extensions.configure<ApplicationExtension> {
configureKotlinAndroid(this)
defaultConfig {
minSdk = libs.findVersion("minSdk").get().toString().toInt()
targetSdk = libs.findVersion("compileSdk").get().toString().toInt()
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { useSupportLibrary = true }
}

buildFeatures {
buildConfig = true
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
*
* Copyright 2025 Esri
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

import com.android.build.api.dsl.LibraryExtension
import com.esri.arcgismaps.kotlin.build_logic.convention.configureAndroidCompose
import com.esri.arcgismaps.kotlin.build_logic.convention.configureKotlinAndroid
import com.esri.arcgismaps.kotlin.build_logic.extensions.androidTestImplementation
import com.esri.arcgismaps.kotlin.build_logic.extensions.debugImplementation
import com.esri.arcgismaps.kotlin.build_logic.extensions.implementation
import com.esri.arcgismaps.kotlin.build_logic.extensions.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType

class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply(libs.findPlugin("android-library").get().get().pluginId)
apply(libs.findPlugin("kotlin-android").get().get().pluginId)
apply(libs.findPlugin("compose-compiler").get().get().pluginId)
apply(libs.findPlugin("kotlin-parcelize").get().get().pluginId)
apply(libs.findPlugin("kotlin-serialization").get().get().pluginId)
}
val extension = extensions.getByType<LibraryExtension>()
configureKotlinAndroid(extension)
configureAndroidCompose(extension)

// Add common Compose dependencies for library modules
dependencies {
implementation(platform(libs.findLibrary("androidx-compose-bom").get()))
implementation(libs.findBundle("composeCore").get())
implementation(libs.findBundle("core").get())
implementation(libs.findLibrary("androidx-lifecycle-runtime-compose").get())
implementation(libs.findLibrary("androidx-activity-compose").get())
implementation(libs.findLibrary("androidx-material-icons").get())
implementation(libs.findLibrary("kotlinx-serialization-json").get())
androidTestImplementation(libs.findLibrary("mockingjay").get())
androidTestImplementation(libs.findBundle("composeTest").get())
androidTestImplementation(libs.findBundle("androidXTest").get())
debugImplementation(libs.findBundle("debug").get())
}
}
}
}
Loading