Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion LabApiUtilities/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'com.microsoft.identity.buildsystem' version '0.2.3'
id 'com.microsoft.identity.buildsystem' version '0.2.5'

// the below build plugin allows to generate BuildConfig files in a JAVA gradle project.
// BuildConfig files are generated by default in an Android project, however, a non-Android java
Expand Down
13 changes: 7 additions & 6 deletions azure-pipelines/pull-request-validation/build-consumers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ stages:
displayName: Assemble msal
inputs:
jdkArchitecture: x64
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
tasks: clean msal:assembleLocal
- template: ../templates/steps/automation-cert.yml
- task: Gradle@3
displayName: Run msal Unit tests
inputs:
tasks: msal:testLocalDebugUnitTest -Plabtest -PlabSecret=$(LabVaultAppCert) -ProbolectricSdkVersion=${{variables.robolectricSdkVersion}} -PmockApiUrl=$(MOCK_API_URL)
jdkArchitecture: x64
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
# broker
- job: brokerValidation
displayName: Broker
Expand Down Expand Up @@ -171,13 +171,13 @@ stages:
tasks: AADAuthenticator:clean AADAuthenticator:assembleLocal --build-cache --info
publishJUnitResults: false
jdkArchitecture: x64
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
- task: Gradle@3
displayName: Run broker Unit tests
inputs:
tasks: AADAuthenticator:localDebugAADAuthenticatorUnitTestCoverageReport --build-cache --info -Plabtest -PlabSecret=$(LabVaultAppCert) -ProbolectricSdkVersion=${{variables.robolectricSdkVersion}} -PpowerLiftApiKey=$(powerliftApiKey) -PcodeCoverageEnabled=true ${{variables.shouldSkipLongRunningTest}}
jdkArchitecture: x64
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
# Linux broker
- job: linuxBrokerValidation
displayName: Linux Broker
Expand Down Expand Up @@ -226,6 +226,7 @@ stages:
tasks: LinuxBroker:clean LinuxBroker:assemble --build-cache --info
publishJUnitResults: false
jdkArchitecture: x86
jdkVersionOption: "1.17"
- task: Bash@3
displayName: Execute tests
inputs:
Expand Down Expand Up @@ -277,10 +278,10 @@ stages:
inputs:
tasks: clean adal:assembleLocal
jdkArchitecture: x64
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
- task: Gradle@3
displayName: Run adal Unit tests
inputs:
tasks: adal:testLocalDebugUnitTest -Plabtest -ProbolectricSdkVersion=${{variables.robolectricSdkVersion}} -PlabSecret=$(LabVaultAppCert)
jdkArchitecture: x64
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
9 changes: 5 additions & 4 deletions azure-pipelines/pull-request-validation/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
displayName: Assemble Local
inputs:
javaHomeSelection: JDKVersion
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
tasks: clean common:assembleLocal
publishJUnitResults: false
jdkArchitecture: x64
Expand All @@ -48,14 +48,14 @@ jobs:
displayName: Run Unit tests
inputs:
javaHomeSelection: JDKVersion
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
tasks: common:testLocalDebugUnitTest -PlabSecret=$(LabVaultAppCert) -PmockApiUrl=$(MOCK_API_URL)
- task: Gradle@3
displayName: Check Dependencies size
condition: eq(variables['system.pullRequest.targetBranch'], 'dev')
inputs:
tasks: common:dependenciesSizeCheck -PdependenciesSizeCheckConfig=distReleaseRuntimeClasspath
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"

- job: spotbugs
displayName: SpotBugs
Expand All @@ -68,6 +68,7 @@ jobs:
- template: ../templates/steps/spotbugs.yml
parameters:
project: common

- job: lint
displayName: Lint
cancelTimeoutInMinutes: 1
Expand All @@ -87,5 +88,5 @@ jobs:
tasks: clean common:lintLocalDebug
publishJUnitResults: false
javaHomeSelection: JDKVersion
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
...
4 changes: 4 additions & 0 deletions azure-pipelines/pull-request-validation/common4j.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
inputs:
cwd: $(Build.SourcesDirectory)/common-java-root
tasks: clean common4j:assemble
javaHomeOption: JDKVersion
jdkVersionOption: 1.17
- template: ../templates/steps/spotbugs.yml
parameters:
project: common4j
Expand All @@ -41,4 +43,6 @@ jobs:
inputs:
cwd: $(Build.SourcesDirectory)/common-java-root
tasks: common4j:test -Psugar=true -PmockApiUrl=$(MOCK_API_URL)
javaHomeOption: JDKVersion
jdkVersionOption: 1.17
...
4 changes: 4 additions & 0 deletions azure-pipelines/pull-request-validation/lab-utilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
inputs:
cwd: $(Build.SourcesDirectory)/common-java-root
tasks: LabApiUtilities:clean LabApiUtilities:assemble
javaHomeSelection: JDKVersion
jdkVersionOption: "1.17"
- template: ../templates/steps/spotbugs.yml
parameters:
project: LabApiUtilities
Expand All @@ -41,4 +43,6 @@ jobs:
inputs:
cwd: $(Build.SourcesDirectory)/common-java-root
tasks: LabApiUtilities:test -Psugar=true -PlabSecret=$(LabVaultAppCert)
javaHomeSelection: JDKVersion
jdkVersionOption: "1.17"
...
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ steps:
displayName: Assemble ${{ parameters.project }} ${{ parameters.variant }}
inputs:
javaHomeSelection: JDKVersion
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
tasks: '${{ parameters.project }}:clean ${{ parameters.project }}:assemble${{ parameters.variant }} ${{ parameters.buildArguments }}'
- task: Gradle@2
displayName: Publish
inputs:
javaHomeSelection: JDKVersion
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
tasks: '${{ parameters.project }}:publish${{ parameters.variant }} ${{ parameters.buildArguments }}'
- task: Gradle@2
displayName: Run unit tests
inputs:
javaHomeSelection: JDKVersion
jdkVersionOption: "1.11"
jdkVersionOption: "1.17"
tasks: '${{ parameters.project }}:test${{ parameters.variant }} -PlabSecret=$(LabVaultAppCert)'
- ${{ if ne(parameters.artifactFolder, '') }}:
- task: CopyFiles@2
Expand Down
5 changes: 3 additions & 2 deletions azure-pipelines/templates/steps/spotbugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ parameters:
default: CodeAnalysisLogs
- name: cwd
default: $(Build.SourcesDirectory)

- name: javaVersion
default: "1.17"
steps:
- task: Gradle@3
displayName: 'Run Spotbugs'
inputs:
javaHomeSelection: JDKVersion
jdkVersionOption: "1.11"
jdkVersionOption: ${{parameters.javaVersion}}
jdkArchitecture: x64
cwd: ${{ parameters.cwd }}
tasks: ${{ parameters.project }}:${{ parameters.spotbugsCommand }}
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Version 21.0.0
- [PATCH] Fix multiple prompts issue in cross cloud request (#2599)
- [PATCH] Corrected error handling in cross cloud scenario (#2602)
- [MINOR] Native auth: Add claimsRequest also to getAccessToken and signIn after signUp/SSPR flows (#2622)
- [MINOR] Upgrading AGP Version to 8.1.1 (#2587)

Version 20.1.1
----------
Expand Down
3 changes: 2 additions & 1 deletion common-java-root/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ org.gradle.daemon=true

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

# This the TSL versionName...
versionName=1.5.9
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
43 changes: 34 additions & 9 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.microsoft.identity.buildsystem' version '0.2.3'
id 'com.microsoft.identity.buildsystem' version '0.2.5'
id 'com.android.library'
id 'pmd'
id 'checkstyle'
Expand Down Expand Up @@ -61,7 +61,11 @@ android {
buildConfigField("boolean", "trustDebugBrokerFlag", "$trustDebugBrokerFlag")
buildConfigField("boolean", "bypassRedirectUriCheck", "$bypassRedirectUriCheck")
}

//aidl is being set to true since aidl only generated with this set
buildFeatures {
buildConfig = true
aidl = true
}
buildTypes {
debug {
testCoverageEnabled enableCodeCoverage
Expand Down Expand Up @@ -118,6 +122,7 @@ android {
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
aidl.srcDirs = ['src/main/aidl']

// Also load source from common-java
java.srcDirs = ['src/main/java', 'src/main/kotlin']
Expand Down Expand Up @@ -241,15 +246,15 @@ android.libraryVariants.all { variant ->
// Create tasks to generate javadoc jar
android.libraryVariants.all { variant ->
task("${variant.name}JavadocJar", type: Jar, dependsOn: "${variant.name}Javadoc") {
classifier 'javadoc'
archiveClassifier.set('javadoc')
from tasks["${variant.name}Javadoc"].destinationDir
}
}


tasks.register('sourcesJar', Jar) {
from android.sourceSets.main.java.srcDirs
classifier 'sources'
archiveClassifier.set('sources')
destinationDirectory = reporting.file("$project.buildDir/outputs/jar/")
}

Expand Down Expand Up @@ -285,11 +290,10 @@ tasks.register('pmd', Pmd) {
source = fileTree('src/main/java')

reports {
xml.enabled = false
html.enabled = true
xml.required = false
html.required = true
}
}

// For publishing to the remote maven repo.
afterEvaluate {

Expand Down Expand Up @@ -336,6 +340,7 @@ afterEvaluate {
groupId 'com.microsoft.identity'
artifactId 'common-debug'
//Edit the 'version' here for VSTS RC build

version = project.version
}
}
Expand Down Expand Up @@ -365,11 +370,31 @@ tasks.configureEach { task ->
if (task.name == 'assembleDistRelease') {
task.dependsOn 'sourcesJar'
}
// Due to gradle version increase, we need to be more explicit in the dependency chain
// More information can be found here: https://docs.gradle.org/8.1/userguide/validation_problems.html#implicit_dependency
if (task.name == "publishDistDebugPublicationToVsts-maven-adal-androidRepository") {
task.mustRunAfter 'generatePomFileForDistReleasePublication', 'bundleDistReleaseAar'
}
if (task.name == "publishDistReleasePublicationToVsts-maven-adal-androidRepository") {
task.dependsOn 'bundleDistReleaseAar'
}
if (task.name == "generateMetadataFileForDistDebugPublication") {
task.mustRunAfter 'bundleDistReleaseAar'
}
if (task.name == "generateMetadataFileForDistReleasePublication") {
task.dependsOn 'bundleDistDebugAar'
}
}

// This is used to generate the pom file for publishing to external maven in maven-release-jobs.yml
// This is used to generate the pom file for publishing to external maven in maven-release-jobs.yml.
// Need to distinguish between distDebug and distRelease for the destination
tasks.withType(GenerateMavenPom).all {
destination = layout.buildDirectory.file("poms/${project.name}-${project.version}.pom").get().asFile
def functionName = name.toLowerCase()
if (functionName.contains("distdebug")) {
destination = layout.buildDirectory.file("poms/common-debug-${project.version}.pom").get().asFile
} else if (functionName.contains("distrelease")) {
destination = layout.buildDirectory.file("poms/common-${project.version}.pom").get().asFile
}
}

def dependenciesSizeInMb = project.hasProperty("dependenciesSizeMb") ? project.dependenciesSizeMb : "15"
Expand Down
8 changes: 5 additions & 3 deletions common4j/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

plugins {
id 'java-library'
id 'com.microsoft.identity.buildsystem' version '0.2.3'
id 'com.microsoft.identity.buildsystem' version '0.2.5'
id 'maven-publish'

// the below build plugin allows to generate BuildConfig files in a JAVA gradle project.
Expand Down Expand Up @@ -61,13 +61,15 @@ project.ext.vstsPassword = System.getenv("ENV_VSTS_MVN_ANDROIDCOMMON_ACCESSTOKEN
version = getAppVersionName()

task sourcesJar(type: Jar) {
dependsOn generateBuildConfig
from sourceSets.main.java.srcDirs
classifier 'sources'
archiveClassifier.set('sources')
destinationDirectory = reporting.file("$project.buildDir/outputs/jars")
}

// Task to generate javadoc
task generateJavadoc(type: Javadoc) {
dependsOn generateBuildConfig
failOnError false
title = "Microsoft Identity Common Java"
source = sourceSets.main.java
Expand All @@ -84,7 +86,7 @@ task generateJavadoc(type: Javadoc) {
// Task to generate javadoc.jar
task javadocJar(type: Jar, dependsOn: generateJavadoc) {
from javadoc.destinationDir
classifier 'javadoc'
archiveClassifier.set('javadoc')
destinationDirectory = reporting.file("$project.buildDir/outputs/jars")
}

Expand Down
2 changes: 1 addition & 1 deletion common4j/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ org.gradle.daemon=true

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

# This the TSL versionName...
versionName=1.5.9
Expand Down
4 changes: 2 additions & 2 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ext {
buildToolsVersion = "28.0.3"

// Plugins
gradleVersion = '7.4.2'
gradleVersion = '8.1.1'
kotlinVersion = '1.7.21'
spotBugsGradlePluginVersion = '4.7.1'
jupiterApiVersion = '5.6.0'
Expand Down Expand Up @@ -48,7 +48,7 @@ ext {
uiAutomatorVersion = "2.2.0"
daggerVersion = "2.31.2"
daggerCompilerVersion = "2.31.2"
msal4jVersion = "1.10.0"
msal4jVersion = "1.20.1"
moshiVersion = "1.14.0"
moshiAdaptersVersion = "1.14.0"
openpojoVersion = "0.9.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
Loading
Loading