Skip to content

Commit 4821f95

Browse files
authored
Target, compile SDK, AGP and gradle versions increased (#1882)
- Target sdk version changed to 33 - Compile sdk version changed to 34 - AGP version changed to 7.4.2 - Gradle distribution url changed to 7.5 After changing above versions, I had to update other dependencies for compatibility - Powerlift version changed to 1.0.3 - Bouncy castle version changed to 1.69 - robolectric version to 4.9 - Also, with new gradle versions, some of the properties used in gradle were deprecated (naming conventions changed). So, made those changes - With gradle version changes, we should not be having a package name in AndroidManifest.xml.. instead, should add a namespace property in build.gradle. https://developer.android.com/build/publish-library/prep-lib-release#choose-namespace - For apps targeting Android 14, Android restricts apps from sending implicit intents to internal app components. So , added exported attribute. https://developer.android.com/about/versions/14/behavior-changes-14#safer-intents
1 parent 8b68d0b commit 4821f95

File tree

14 files changed

+51
-29
lines changed

14 files changed

+51
-29
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ name: $(date:yyyyMMdd)$(rev:.r)
77

88
variables:
99
- name: BuildParameters.jdkVersion
10-
value: 1.8
10+
value: 1.11
1111
- name: BuildParameters.jdkArchitecture
1212
value: x64
1313
- name: BuildParameters.javaHomeSelection
1414
value: JDKVersion
1515
- name: robolectricSdkVersion
16-
value: 28
16+
value: 33
1717

1818
trigger:
1919
branches:
@@ -44,8 +44,9 @@ jobs:
4444
persistCredentials: True
4545
- template: azure-pipelines/templates/steps/automation-cert.yml@common
4646
- task: JavaToolInstaller@0
47-
displayName: Use Java 8
47+
displayName: Use Java 11
4848
inputs:
49+
versionSpec: '11'
4950
jdkArchitectureOption: x64
5051
jdkSourceOption: PreInstalled
5152
- task: Gradle@2
@@ -88,11 +89,12 @@ jobs:
8889
inputs:
8990
filename: echo
9091
arguments: '##vso[task.setvariable variable=ENV_VSTS_MVN_ANDROID_MSAL_ACCESSTOKEN]$(System.AccessToken)'
91-
- task: Gradle@1
92+
- task: Gradle@3
9293
displayName: Lint Local debug
9394
inputs:
9495
tasks: clean msal:lintLocalDebug
9596
publishJUnitResults: false
97+
jdkVersion: 1.11
9698
- job: codeql
9799
displayName: CodeQL
98100
cancelTimeoutInMinutes: 1
@@ -101,6 +103,12 @@ jobs:
101103
clean: true
102104
submodules: recursive
103105
persistCredentials: True
106+
- task: JavaToolInstaller@0
107+
displayName: Use Java 11
108+
inputs:
109+
versionSpec: '11'
110+
jdkArchitectureOption: x64
111+
jdkSourceOption: PreInstalled
104112
- task: CmdLine@1
105113
displayName: Set Office MVN Access Token in Environment
106114
inputs:

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
V.NEXT
33
----------
44
- [MINOR] MSA UI tests for Brokered Auth (#1856)
5+
- [MINOR] Updated target, compile SDK, AGP and gradle versions(#1882)
56

67
Version 4.7.0
78
----------

gradle/versions.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ ext {
55
minSdkVersion = 16
66
brokerProjectMinSdkVersion = 24
77
automationAppMinSDKVersion = 21
8-
targetSdkVersion = 30
9-
compileSdkVersion = 30
8+
targetSdkVersion = 33
9+
compileSdkVersion = 34
1010
buildToolsVersion = "28.0.3"
1111

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

1818
//Java Language Support
19-
coreLibraryDesugaringVersion = "1.0.9"
19+
coreLibraryDesugaringVersion = "1.1.5"
2020

2121
// Libraries
2222
androidxTestRunnerVersion = "1.4.0"
@@ -34,7 +34,7 @@ ext {
3434
junitVersion = "4.12"
3535
legacySupportV4Version = "1.0.0"
3636
localBroadcastManagerVersion = "1.0.0"
37-
lombokVersion = "1.18.12"
37+
lombokVersion = "1.18.22"
3838
materialVersion = "1.0.0"
3939
mockitoCoreVersion = "3.6.28"
4040
mockitoAndroidVersion = "3.6.28"
@@ -43,7 +43,7 @@ ext {
4343
powerMockVersion = "2.0.9"
4444
runnerVersion = "1.2.0"
4545
rulesVersion = "1.2.0"
46-
robolectricVersion = "4.5.1"
46+
robolectricVersion = "4.9.2"
4747
uiAutomatorVersion = "2.2.0"
4848
flatBuffersJavaVersion = "1.12.0"
4949
daggerVersion = "2.31.2"
@@ -61,14 +61,14 @@ ext {
6161
junitVintageEngineVersion = "5.7.2"
6262
dbusJavaVersion = "3.3.0"
6363
dbusJavaUtilsVersion = "3.3.0"
64-
bouncyCastleVersion = "1.67"
64+
bouncyCastleVersion = "1.69"
6565
oshiCoreVersion = "5.7.5"
6666
tokenShare = "1.6.5"
6767
intuneAppSdkVersion = "8.6.3"
6868
javaAssistVersion = "3.27.0-GA"
6969
yubikitAndroidVersion = "2.3.0"
7070
yubikitPivVersion = "2.3.0"
71-
powerliftAndroidVersion="1.0.0"
71+
powerliftAndroidVersion="1.0.3"
7272

7373
// microsoft-diagnostics-uploader app versions
7474
powerliftVersion = "0.14.7"

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-6.8.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

msal/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ android {
5454
}
5555

5656

57-
compileSdkVersion rootProject.ext.compileSdkVersion
57+
compileSdk rootProject.ext.compileSdkVersion
5858

5959
defaultConfig {
6060
multiDexEnabled true
6161
minSdkVersion rootProject.ext.minSdkVersion
6262
if(project.getProperties().get("robolectricSdkVersion")){
6363
println "Using command line parameter robolectricSdkVersion for target sdk version " + project.getProperties().get("robolectricSdkVersion")
6464
targetSdkVersion project.getProperties().get("robolectricSdkVersion")
65-
}else{
65+
} else{
6666
targetSdkVersion rootProject.ext.targetSdkVersion
6767
}
6868
versionCode getAppVersionCode()
@@ -161,7 +161,8 @@ android {
161161
task javadoc(type: Javadoc) {
162162
failOnError false
163163
source = android.sourceSets.main.java.srcDirs
164-
classpath += configurations.compile
164+
configurations.api.setCanBeResolved(true)
165+
classpath += configurations.api
165166
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
166167

167168
options.memberLevel = JavadocMemberLevel.PUBLIC
@@ -218,7 +219,7 @@ dependencies {
218219
//mockito-inline was introduced in mockito 2.7.6
219220
//see: https://javadoc.io/static/org.mockito/mockito-core/3.6.28/org/mockito/Mockito.html#0.1
220221
testImplementation "org.mockito:mockito-inline:$rootProject.ext.mockitoCoreVersion"
221-
testImplementation ("org.robolectric:robolectric:4.5.1")
222+
testImplementation ("org.robolectric:robolectric:$rootProject.ext.robolectricVersion")
222223
testImplementation "androidx.test:core:$rootProject.ext.androidxTestCoreVersion"
223224
testLocalImplementation project(':testutils')
224225
testDistImplementation("com.microsoft.identity:testutils:0.0+") {

msal/src/androidTest/AndroidManifest.xml

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

@@ -18,7 +18,10 @@
1818

1919
<activity android:name="com.microsoft.identity.client.TestActivity" />
2020

21-
<activity android:name="com.microsoft.identity.client.BrowserTabActivity">
21+
<activity
22+
tools:replace="android:exported"
23+
android:name="com.microsoft.identity.client.BrowserTabActivity"
24+
android:exported="true">
2225
<intent-filter>
2326
<action android:name="android.intent.action.VIEW" />
2427

msalautomationapp/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ android {
4747

4848
defaultConfig {
4949
multiDexEnabled true
50+
namespace = "com.microsoft.identity.client.msal.automationapp"
5051
applicationId "com.msft.identity.client.sample"
5152
minSdkVersion rootProject.ext.automationAppMinSDKVersion
5253
targetSdkVersion rootProject.ext.targetSdkVersion

msalautomationapp/src/androidTest/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
android:supportsRtl="true"
1414
android:theme="@style/AppTheme">
1515

16-
<activity android:name=".MainActivity">
16+
<activity
17+
android:name=".MainActivity"
18+
android:exported="true">
1719
<intent-filter>
1820
<action android:name="android.intent.action.MAIN" />
1921

msalautomationapp/src/androidTest/java/com/microsoft/identity/client/msal/automationapp/testpass/broker/AbstractMsalBrokerUpdateTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import androidx.annotation.Nullable;
2727

2828
import com.microsoft.identity.client.msal.automationapp.AbstractMsalUiTest;
29-
import com.microsoft.identity.client.msal.automationapp.BrokerTestHelper;
3029
import com.microsoft.identity.client.msal.automationapp.BuildConfig;
3130
import com.microsoft.identity.client.ui.automation.IBrokerTest;
3231
import com.microsoft.identity.client.ui.automation.annotations.SupportedBrokers;

0 commit comments

Comments
 (0)