diff --git a/build.gradle b/build.gradle index 54a746920..db420eda2 100644 --- a/build.gradle +++ b/build.gradle @@ -8,10 +8,21 @@ buildscript { repositories { google() mavenCentral() + maven { + // msazure and aria are consumed via upstream sources of the AndroidADAL feed. + name "vsts-maven-adal-android" + url "https://identitydivision.pkgs.visualstudio.com/_packaging/AndroidADAL/maven/v1" + credentials { + username project.vstsUsername + password project.vstsMavenAccessToken + } + } } dependencies { classpath "com.android.tools.build:gradle:$rootProject.ext.gradleVersion" + classpath "org.javassist:javassist:${rootProject.ext.javaAssistVersion}" + classpath "com.microsoft.intune.mam:android-build-plugin:${rootProject.ext.intuneAppSdkVersion}" } } diff --git a/gradle/versions.gradle b/gradle/versions.gradle index efdcf9fad..04529fa9e 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -43,6 +43,8 @@ ext { uiAutomatorVersion = "2.2.0" mseberaApacheHttpClientVersion = "4.5.8" msal4jVersion = "1.10.0" + intuneAppSdkVersion = "8.6.3" + javaAssistVersion = "3.27.0-GA" // TODO: adal automation test app. supportLibraryVersion = "27.1.+" diff --git a/settings.gradle b/settings.gradle index 67a78cfb7..1748ca48d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,15 @@ pluginManagement { google() mavenCentral() gradlePluginPortal() + maven { + // msazure and aria are consumed via upstream sources of the AndroidADAL feed. + name "vsts-maven-adal-android" + url "https://identitydivision.pkgs.visualstudio.com/_packaging/AndroidADAL/maven/v1" + credentials { + username vstsUsername + password vstsMavenAccessToken + } + } } } include ':msal', ':common', ':keyvault', ':labapi', ':testutils', ':pop-benchmarker', diff --git a/testapps/testapp/build.gradle b/testapps/testapp/build.gradle index 754aef672..5fde61104 100644 --- a/testapps/testapp/build.gradle +++ b/testapps/testapp/build.gradle @@ -23,7 +23,11 @@ * // THE SOFTWARE. */ -apply plugin: 'com.android.application' + +plugins { + id "com.android.application" + id "com.microsoft.intune.mam" +} def msalVersion = "4.+" @@ -108,7 +112,14 @@ dependencies { implementation "androidx.appcompat:appcompat:$rootProject.ext.appCompatVersion" implementation "androidx.legacy:legacy-support-v4:$rootProject.ext.legacySupportV4Version" implementation "com.google.android.material:material:$rootProject.ext.materialVersion" + implementation "com.microsoft.intune.mam:android-sdk:$rootProject.ext.intuneAppSdkVersion" compileOnly "org.projectlombok:lombok:$rootProject.ext.lombokVersion" annotationProcessor "org.projectlombok:lombok:$rootProject.ext.lombokVersion" } + +//https://docs.microsoft.com/en-us/mem/intune/developer/app-sdk-android +intunemam { + verify = true + incremental = true //Experimental +} diff --git a/testapps/testapp/src/main/AndroidManifest.xml b/testapps/testapp/src/main/AndroidManifest.xml index 68a01f9d9..9e532f41e 100644 --- a/testapps/testapp/src/main/AndroidManifest.xml +++ b/testapps/testapp/src/main/AndroidManifest.xml @@ -38,7 +38,7 @@