From 29d62fc436904c0383b2bf56b8d7c32c334db39f Mon Sep 17 00:00:00 2001 From: Ridam Arora Date: Thu, 9 Jul 2026 12:47:04 -0700 Subject: [PATCH 1/5] change gradle API used by buildsystem plugin --- plugins/buildsystem/build.gradle | 20 ++++++++++++++++++- plugins/buildsystem/changelog | 4 ++++ .../identity/buildsystem/BuildPlugin.java | 10 +++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/plugins/buildsystem/build.gradle b/plugins/buildsystem/build.gradle index 8ed9d8ab..1827759c 100644 --- a/plugins/buildsystem/build.gradle +++ b/plugins/buildsystem/build.gradle @@ -10,7 +10,7 @@ plugins { } group 'com.microsoft.identity' -version '0.2.5' +version '0.2.6-dev' tasks.withType(JavaCompile) { sourceCompatibility = '11' @@ -51,6 +51,24 @@ repositories { } } +// Publish target for the internal NewAndroid Azure Artifacts feed. +// The java-gradle-plugin + maven-publish plugins auto-create the plugin's +// publications (the plugin jar/pom and the plugin-marker artifact); this block +// only tells Gradle WHERE to push them. Consuming repos resolve the plugin from +// this same feed via their settings.gradle pluginManagement block. +publishing { + repositories { + maven { + name "vsts-maven-new-android" + url "https://identitydivision.pkgs.visualstudio.com/_packaging/NewAndroid/maven/v1" + credentials { + username System.getenv("ENV_VSTS_MVN_CRED_USERNAME") != null ? System.getenv("ENV_VSTS_MVN_CRED_USERNAME") : project.findProperty("vstsUsername") + password System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") != null ? System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") : project.findProperty("vstsMavenAccessToken") + } + } + } +} + dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${rootProject.ext.jupiterApiVersion}" testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' diff --git a/plugins/buildsystem/changelog b/plugins/buildsystem/changelog index d1406ed0..10044df5 100644 --- a/plugins/buildsystem/changelog +++ b/plugins/buildsystem/changelog @@ -1,5 +1,9 @@ Plugin Overview: https://github.com/AzureAD/android-complete/blob/master/plugins/buildsystem/docs/Overview.md +Version 0.2.6 +---------------------------- +[MINOR] Remove use of deleted gradle APIs + Version 0.2.3 ---------------------------- [PATCH] Allow ability to enable/disable code coverage - disabled by default diff --git a/plugins/buildsystem/src/main/java/com/microsoft/identity/buildsystem/BuildPlugin.java b/plugins/buildsystem/src/main/java/com/microsoft/identity/buildsystem/BuildPlugin.java index 32216c28..f1a0838f 100644 --- a/plugins/buildsystem/src/main/java/com/microsoft/identity/buildsystem/BuildPlugin.java +++ b/plugins/buildsystem/src/main/java/com/microsoft/identity/buildsystem/BuildPlugin.java @@ -27,15 +27,13 @@ import org.gradle.api.JavaVersion; import org.gradle.api.Plugin; import org.gradle.api.Project; +import org.gradle.api.plugins.JavaPluginExtension; public class BuildPlugin implements Plugin { private final static String ANDROID_LIBRARY_PLUGIN_ID = "com.android.library"; private final static String JAVA_LIBRARY_PLUGIN_ID = "java-library"; - private final static String JAVA_SOURCE_COMPATIBILITY_PROPERTY = "sourceCompatibility"; - private final static String JAVA_TARGET_COMPATIBILITY_PROPERTY = "targetCompatibility"; - @Override public void apply(final Project project) { @@ -70,8 +68,10 @@ private void applyDesugaringToAndroidProject(final Project project){ private void applyJava8ToJavaProject(final Project project) { project.getPluginManager().withPlugin(JAVA_LIBRARY_PLUGIN_ID, appliedPlugin -> { - project.setProperty(JAVA_SOURCE_COMPATIBILITY_PROPERTY, JavaVersion.VERSION_1_8); - project.setProperty(JAVA_TARGET_COMPATIBILITY_PROPERTY, JavaVersion.VERSION_1_8); + final JavaPluginExtension javaPluginExtension = project.getExtensions() + .getByType(JavaPluginExtension.class); + javaPluginExtension.setSourceCompatibility(JavaVersion.VERSION_1_8); + javaPluginExtension.setTargetCompatibility(JavaVersion.VERSION_1_8); }); } } From 304d5112aa2c5116b610bb7e6e3eba2e35b6e6fa Mon Sep 17 00:00:00 2001 From: Ridam Arora Date: Thu, 9 Jul 2026 13:45:34 -0700 Subject: [PATCH 2/5] remove unwated publishing changes --- plugins/buildsystem/build.gradle | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/plugins/buildsystem/build.gradle b/plugins/buildsystem/build.gradle index 1827759c..561231c0 100644 --- a/plugins/buildsystem/build.gradle +++ b/plugins/buildsystem/build.gradle @@ -51,24 +51,6 @@ repositories { } } -// Publish target for the internal NewAndroid Azure Artifacts feed. -// The java-gradle-plugin + maven-publish plugins auto-create the plugin's -// publications (the plugin jar/pom and the plugin-marker artifact); this block -// only tells Gradle WHERE to push them. Consuming repos resolve the plugin from -// this same feed via their settings.gradle pluginManagement block. -publishing { - repositories { - maven { - name "vsts-maven-new-android" - url "https://identitydivision.pkgs.visualstudio.com/_packaging/NewAndroid/maven/v1" - credentials { - username System.getenv("ENV_VSTS_MVN_CRED_USERNAME") != null ? System.getenv("ENV_VSTS_MVN_CRED_USERNAME") : project.findProperty("vstsUsername") - password System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") != null ? System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") : project.findProperty("vstsMavenAccessToken") - } - } - } -} - dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${rootProject.ext.jupiterApiVersion}" testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' From 0902aa170e72d6ffc8332467e77cd84ef619a86b Mon Sep 17 00:00:00 2001 From: Ridam Arora Date: Wed, 15 Jul 2026 17:01:41 -0700 Subject: [PATCH 3/5] upgrade spotBugsGradlePluginVersionFrom 4.7.1 to 6.5.8 --- gradle/versions.gradle | 2 +- plugins/buildsystem/build.gradle | 2 +- plugins/buildsystem/changelog | 1 + plugins/buildsystem/gradle/versions.gradle | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle/versions.gradle b/gradle/versions.gradle index cbd78be9..1d4846b7 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -10,7 +10,7 @@ ext { // Plugins gradleVersion = '8.10.0' kotlinVersion = '1.8.0' - spotBugsGradlePluginVersion = '4.7.1' + spotBugsGradlePluginVersion = '6.5.8' jupiterApiVersion = '5.6.0' //Java Language Support diff --git a/plugins/buildsystem/build.gradle b/plugins/buildsystem/build.gradle index 561231c0..834bd18e 100644 --- a/plugins/buildsystem/build.gradle +++ b/plugins/buildsystem/build.gradle @@ -55,7 +55,7 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${rootProject.ext.jupiterApiVersion}" testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' implementation "com.android.tools.build:gradle:${rootProject.ext.gradleVersion}" - implementation "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:${rootProject.ext.spotBugsGradlePluginVersion}" + implementation "com.github.spotbugs.snom:spotbugs-gradle-plugin:${rootProject.ext.spotBugsGradlePluginVersion}" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${rootProject.ext.kotlinVersion}" testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${rootProject.ext.kotlinVersion}" diff --git a/plugins/buildsystem/changelog b/plugins/buildsystem/changelog index 10044df5..ba4776c3 100644 --- a/plugins/buildsystem/changelog +++ b/plugins/buildsystem/changelog @@ -3,6 +3,7 @@ Plugin Overview: https://github.com/AzureAD/android-complete/blob/master/plugins Version 0.2.6 ---------------------------- [MINOR] Remove use of deleted gradle APIs +[MINOR] Bump SpotBugs Gradle plugin 4.7.1 -> 6.5.8 (4.x used the removed JavaPluginConvention); groupId changed to com.github.spotbugs.snom Version 0.2.3 ---------------------------- diff --git a/plugins/buildsystem/gradle/versions.gradle b/plugins/buildsystem/gradle/versions.gradle index e04747c8..b893e00d 100644 --- a/plugins/buildsystem/gradle/versions.gradle +++ b/plugins/buildsystem/gradle/versions.gradle @@ -1,7 +1,7 @@ // Variables for plugins project ext { kotlinVersion = '1.8.0' - spotBugsGradlePluginVersion = '4.7.1' + spotBugsGradlePluginVersion = '6.5.8' jupiterApiVersion = '5.6.0' gradleVersion = '8.10.0' } From 8fc8127936004f17b8c4542ec058eb7019a705f2 Mon Sep 17 00:00:00 2001 From: Ridam Arora Date: Wed, 15 Jul 2026 18:22:03 -0700 Subject: [PATCH 4/5] change current version name --- plugins/buildsystem/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/buildsystem/build.gradle b/plugins/buildsystem/build.gradle index 834bd18e..386c81d1 100644 --- a/plugins/buildsystem/build.gradle +++ b/plugins/buildsystem/build.gradle @@ -10,7 +10,7 @@ plugins { } group 'com.microsoft.identity' -version '0.2.6-dev' +version '0.2.6' tasks.withType(JavaCompile) { sourceCompatibility = '11' From 24f960e6e0972d3e730c33247b596d5fb57435aa Mon Sep 17 00:00:00 2001 From: Ridam Arora Date: Thu, 16 Jul 2026 13:36:35 -0700 Subject: [PATCH 5/5] Add NewAndroid publishing config + manual publish docs for buildsystem plugin --- plugins/buildsystem/build.gradle | 18 +++++++++++ plugins/buildsystem/docs/Overview.md | 45 +++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/plugins/buildsystem/build.gradle b/plugins/buildsystem/build.gradle index 386c81d1..1bd8ab7d 100644 --- a/plugins/buildsystem/build.gradle +++ b/plugins/buildsystem/build.gradle @@ -51,6 +51,24 @@ repositories { } } +// Publish target for the internal NewAndroid Azure Artifacts feed. +// The java-gradle-plugin + maven-publish plugins auto-create the plugin's +// publications (the plugin jar/pom and the plugin-marker artifact); this block +// only tells Gradle WHERE to push them. Consuming repos resolve the plugin from +// this same feed via their settings.gradle pluginManagement block. +publishing { + repositories { + maven { + name "NewAndroid" + url "https://pkgs.dev.azure.com/IdentityDivision/_packaging/NewAndroid/maven/v1" + credentials { + username System.getenv("ENV_VSTS_MVN_CRED_USERNAME") != null ? System.getenv("ENV_VSTS_MVN_CRED_USERNAME") : project.findProperty("vstsUsername") + password System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") != null ? System.getenv("ENV_VSTS_MVN_CRED_ACCESSTOKEN") : project.findProperty("vstsMavenAccessToken") + } + } + } +} + dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${rootProject.ext.jupiterApiVersion}" testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' diff --git a/plugins/buildsystem/docs/Overview.md b/plugins/buildsystem/docs/Overview.md index c108d9da..653c7f16 100644 --- a/plugins/buildsystem/docs/Overview.md +++ b/plugins/buildsystem/docs/Overview.md @@ -134,4 +134,47 @@ pluginManagement { ## Plugins/Settings applied by BuildPlugin -- [SpotBugs](Spotbugs.md) \ No newline at end of file +- [SpotBugs](Spotbugs.md) + +## Publishing (manual) + +> This plugin is **published manually** — it is intentionally **not** wired into any CI/CD +> pipeline (daily, weekly, or release). Publish a new version by hand using the steps below. + +The `build.gradle` already declares the `NewAndroid` Azure Artifacts feed as a `publishing` +target, so no build changes are needed to publish. + +**Steps:** + +1. **Bump the version** in [`build.gradle`](../build.gradle) (the `version '...'` line) and add a + matching entry to the [`changelog`](../changelog). Feed versions are **immutable** — you cannot + overwrite an already-published version. + +2. **Generate a PAT** with **Packaging → Read & write** scope at + . + +3. **Provide credentials.** The username is arbitrary for Azure Artifacts (use `VSTS`); the PAT is + what authenticates. Either set env vars: + + ```powershell + $env:ENV_VSTS_MVN_CRED_USERNAME = "VSTS" + $env:ENV_VSTS_MVN_CRED_ACCESSTOKEN = "" + ``` + + …or add `vstsUsername` / `vstsMavenAccessToken` to `~/.gradle/gradle.properties` + (never commit the PAT). + +4. **Publish from the android-complete root** (the plugin only builds in the root context — the root + `settings.gradle` `pluginManagement` supplies the Kotlin plugin version): + + ```powershell + .\gradlew.bat :AcaPlugin:publish + ``` + + This uploads both artifacts to the feed: + - `com.microsoft.identity:AcaPlugin:` — the plugin jar + - `com.microsoft.identity.buildsystem:com.microsoft.identity.buildsystem.gradle.plugin:` — the plugin marker consumers resolve + +5. **Verify** the new version at + , then bump + consumers' `id 'com.microsoft.identity.buildsystem' version ''` declarations. \ No newline at end of file