Skip to content

Commit c553208

Browse files
jeffrymsftsomalaya
andauthored
Upgrading the AGP Version from 7.4.2 to 8.1.1, Fixes AB#2779502 (#2254)
Version Updates: - Updated JDK to version 1.17. - Upgraded Gradle to version 8.1.1. - Changed Gradle distribution URL to 8.1-all. Dependency Updates: - Updated build system plugin to version 0.2.5. Build Configuration Changes: - Added namespace properties in build.gradle files as per the new Gradle feature. - Updated Gradle task configurations to use new properties. - Adjusted Maven publishing configurations for different build types. - Removed deprecated properties and replaced them with updated ones. Android Manifest Changes: - Commented out package declarations to align with the namespace property requirements in Gradle. Pipeline and CI/CD Updates: - Updated Gradle tasks to use Java 17 home directory. - Adjusted JDK version in pipeline tasks from 1.11 to 1.17. Working Pipeline runs using my branch of common: MSAL -Build and Test: https://identitydivision.visualstudio.com/Engineering/_build/results?buildId=1466968&view=results Common PR: AzureAD/microsoft-authentication-library-common-for-android#2587 MSAL PR: #2254 Broker PR: https://github.com/AzureAD/ad-accounts-for-android/pull/3052 Azuresample PR: Azure-Samples/ms-identity-android-java#85 [AB#2779502](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/2779502) --------- Co-authored-by: Sowmya Malayanur <[email protected]>
1 parent 2db0125 commit c553208

File tree

16 files changed

+34
-32
lines changed

16 files changed

+34
-32
lines changed

azure-pipelines/pull-request-validation/pr-msal.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: $(date:yyyyMMdd)$(rev:.r)
77
trigger: none
88
variables:
99
- name: BuildParameters.jdkVersion
10-
value: 1.11
10+
value: 1.17
1111
- name: BuildParameters.jdkArchitecture
1212
value: x64
1313
- name: BuildParameters.javaHomeSelection
@@ -40,9 +40,9 @@ jobs:
4040
persistCredentials: True
4141
- template: azure-pipelines/templates/steps/automation-cert.yml@common
4242
- task: JavaToolInstaller@0
43-
displayName: Use Java 11
43+
displayName: Use Java 17
4444
inputs:
45-
versionSpec: '11'
45+
versionSpec: '17'
4646
jdkArchitectureOption: x64
4747
jdkSourceOption: PreInstalled
4848
- task: CodeQL3000Init@0
@@ -62,7 +62,7 @@ jobs:
6262
inputs:
6363
tasks: msal:testLocalDebugUnitTest -Plabtest -PlabSecret=$(LabVaultAppCert) -ProbolectricSdkVersion=${{variables.robolectricSdkVersion}} -PmockApiUrl=$(MOCK_API_URL)
6464
javaHomeSelection: $(BuildParameters.javaHomeSelection)
65-
jdkVersion: 1.11
65+
jdkVersion: 1.17
6666
- job: spotbugs
6767
displayName: SpotBugs
6868
cancelTimeoutInMinutes: 1
@@ -92,6 +92,6 @@ jobs:
9292
inputs:
9393
tasks: clean msal:lintLocalDebug
9494
publishJUnitResults: false
95-
jdkVersion: 1.11
95+
jdkVersion: 1.17
9696

9797
...

changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ MSAL Wiki : https://github.com/AzureAD/microsoft-authentication-library-for-andr
22

33
vNext
44
----------
5+
- [MINOR] Update AGP Version to 8.1.0 (#2254)
56

67
Version 6.1.1
78
----------

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ org.gradle.daemon=true
1010

1111
# See https://stackoverflow.com/questions/56075455/expiring-daemon-because-jvm-heap-space-is-exhausted
1212
# we must make sure that the total size is <7G, as that's the RAM size of VM on the build pipeline.
13-
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError
13+
# MaxMetaspaceSize replaced MaxPermSize as of java 8+.https://www.oracle.com/java/technologies/javase/8-whats-new.html
14+
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError
1415

1516
# For OneAuth default abiSelection
1617
abiSelection=x86_64

gradle/versions.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ext {
1010
buildToolsVersion = "28.0.3"
1111

1212
// Plugins
13-
gradleVersion = '7.4.2'
13+
gradleVersion = '8.1.1'
1414
kotlinVersion = '1.7.21'
1515
spotBugsGradlePluginVersion = '4.7.1'
1616
jupiterApiVersion = '5.6.0'

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip

msal/build.gradle

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'com.microsoft.identity.buildsystem' version '0.2.3'
2+
id 'com.microsoft.identity.buildsystem' version '0.2.5'
33
id 'com.android.library'
44
id 'pmd'
55
id 'checkstyle'
@@ -44,7 +44,7 @@ android {
4444
// coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$rootProject.ext.coreLibraryDesugaringVersion"
4545
// }
4646
// }
47-
47+
namespace "com.microsoft.identity.msal"
4848
compileOptions {
4949
// Flag to enable support for the new language APIs
5050
coreLibraryDesugaringEnabled true
@@ -71,6 +71,9 @@ android {
7171
project.version = android.defaultConfig.versionName
7272
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
7373
}
74+
buildFeatures {
75+
buildConfig = true
76+
}
7477

7578
buildTypes {
7679
// testCoverageEnabled flag is set to true to get coverage reports for Android Tests
@@ -163,7 +166,6 @@ task javadoc(type: Javadoc) {
163166
source = android.sourceSets.main.java.srcDirs
164167
configurations.api.setCanBeResolved(true)
165168
classpath += configurations.api
166-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
167169

168170
options.memberLevel = JavadocMemberLevel.PUBLIC
169171
options.addStringOption('Xdoclint:none', '-quiet')
@@ -172,17 +174,16 @@ task javadoc(type: Javadoc) {
172174
exclude '**/R.java'
173175
destinationDir = reporting.file("$project.buildDir/outputs/jar/javadoc/")
174176
}
175-
176177
// Task to generate javadoc.jar
177178
task javadocJar(type: Jar, dependsOn: javadoc) {
178179
from javadoc.destinationDir
179-
classifier 'javadoc'
180+
archiveClassifier.set('javadoc')
180181
destinationDirectory = reporting.file("$project.buildDir/outputs/jar/")
181182
}
182183

183184
task sourcesJar(type: Jar) {
184185
from android.sourceSets.main.java.srcDirs
185-
classifier 'sources'
186+
archiveClassifier.set('sources')
186187
destinationDirectory = reporting.file("$project.buildDir/outputs/jar/")
187188
}
188189

@@ -300,8 +301,8 @@ task pmd(type: Pmd) {
300301
source = fileTree('src/main/java')
301302

302303
reports {
303-
xml.enabled = false
304-
html.enabled = true
304+
xml.required = false
305+
html.required = true
305306
}
306307
}
307308

@@ -322,7 +323,7 @@ afterEvaluate {
322323
publishing {
323324
publications {
324325
msal(MavenPublication) {
325-
from components.distRelease
326+
from components.findByName('distRelease')
326327
groupId 'com.microsoft.identity.client'
327328
artifactId 'msal'
328329
//Edit the 'version' here for VSTS RC build

msal/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.microsoft.identity.msal">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<uses-permission android:name="android.permission.INTERNET" />
65
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

msalautomationapp/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if (project.hasProperty("localFlights")) {
1414
}
1515

1616
android {
17-
17+
namespace "com.microsoft.identity.client.msal.automationapp"
1818
packagingOptions {
1919
pickFirst 'META-INF/common4j.kotlin_module'
2020
}
@@ -26,7 +26,9 @@ android {
2626
sourceCompatibility JavaVersion.VERSION_1_8
2727
targetCompatibility JavaVersion.VERSION_1_8
2828
}
29-
29+
buildFeatures {
30+
buildConfig = true
31+
}
3032
final String BROKER_HOST = "BrokerHost"
3133
final String BROKER_MICROSOFT_AUTHENTICATOR = "BrokerMicrosoftAuthenticator"
3234
final String BROKER_COMPANY_PORTAL = "BrokerCompanyPortal"

msalautomationapp/src/androidTest/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.microsoft.identity.client.msal.automationapp">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<uses-permission android:name="android.permission.INTERNET"/>
65
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

0 commit comments

Comments
 (0)