From 0564fd4a95b17f27e538acfdd1f5e2d0eaa9b2ed Mon Sep 17 00:00:00 2001 From: Melissa Ahn Date: Wed, 17 Apr 2024 12:57:29 -0700 Subject: [PATCH 1/7] Some publishing logic changes --- adal/build.gradle | 168 ++++++++++++++++++++-------------------------- common | 2 +- 2 files changed, 75 insertions(+), 95 deletions(-) diff --git a/adal/build.gradle b/adal/build.gradle index 6e71f7f08..ea9c34ac0 100644 --- a/adal/build.gradle +++ b/adal/build.gradle @@ -122,13 +122,20 @@ android { disable 'PackageManagerGetSignatures' } - libraryVariants.all { variant -> - variant.outputs.all { - outputFileName = "${archivesBaseName}-${version}.aar" - } - } +// libraryVariants.all { variant -> +// variant.outputs.all { +// outputFileName = "${archivesBaseName}-${version}.aar" +// } +// } useLibrary 'android.test.mock' + + publishing { + singleVariant('distRelease') { + withSourcesJar() + withJavadocJar() + } + } } // In dev, we want to keep the dependencies(common4j, broker4j, common) to 1.0.+ to be able to be consumed by daily dev pipeline. @@ -181,106 +188,79 @@ dependencies { javadocDeps "androidx.legacy:legacy-support-v4:$rootProject.ext.legacySupportV4Version" } -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier 'sources' - destinationDirectory = reporting.file("$project.buildDir/outputs/jar/") -} - -task javadoc(type: Javadoc) { - failOnError false - source = android.sourceSets.main.java.srcDirs - configurations.implementation.setCanBeResolved(true) - classpath += configurations.implementation - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - classpath += configurations.javadocDeps - exclude '**/*.aidl' - - if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } - } - } - - destinationDir = reporting.file("$project.buildDir/outputs/jar/javadoc/") -} - -tasks.register('javadocJar', Jar) { - dependsOn javadoc - classifier 'javadoc' - from javadoc.destinationDir - destinationDirectory = reporting.file("$project.buildDir/outputs/jar/") -} +//task sourcesJar(type: Jar) { +// from android.sourceSets.main.java.srcDirs +// classifier 'sources' +// destinationDirectory = reporting.file("$project.buildDir/outputs/jar/") +//} +// +//task javadoc(type: Javadoc) { +// failOnError false +// source = android.sourceSets.main.java.srcDirs +// configurations.implementation.setCanBeResolved(true) +// classpath += configurations.implementation +// classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) +// classpath += configurations.javadocDeps +// exclude '**/*.aidl' +// +// if (JavaVersion.current().isJava8Compatible()) { +// allprojects { +// tasks.withType(Javadoc) { +// options.addStringOption('Xdoclint:none', '-quiet') +// } +// } +// } +// +// destinationDir = reporting.file("$project.buildDir/outputs/jar/javadoc/") +//} +// +//tasks.register('javadocJar', Jar) { +// dependsOn javadoc +// classifier 'javadoc' +// from javadoc.destinationDir +// destinationDirectory = reporting.file("$project.buildDir/outputs/jar/") +//} // For publishing to the remote maven repo. publishing { publications { adal(MavenPublication) { + afterEvaluate { + from components.distRelease + } groupId 'com.microsoft.aad' artifactId 'adal' //Edit the 'version' here for VSTS RC build version = project.version - pom.withXml { - // Custom values - - // Name - asNode().appendNode('name', 'adal') - - // Description - asNode().appendNode( - 'description', - 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' - ) - - // URL - asNode().appendNode('url', 'https://github.com/AzureAD/azure-activedirectory-library-for-android') - - // Inception Year - asNode().appendNode('inceptionYear', '2014') - - // Licenses - asNode().appendNode('licenses').appendNode('license').appendNode('name', 'MIT License') - - // Developers - def developerNode = asNode().appendNode('developers').appendNode('developer') - developerNode.appendNode('id', 'microsoft') - developerNode.appendNode('name', 'Microsoft') - - // SCM - asNode().appendNode('scm').appendNode('url', 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master') - - // Properties - def propertiesNode = asNode().appendNode('properties') - propertiesNode.appendNode('branch', 'master') - propertiesNode.appendNode('version', project.version) - - def dependenciesNode = asNode().appendNode('dependencies') - - def deps = configurations.implementation.allDependencies.asList() - if (project.version.toString().endsWith("SNAPSHOT")) { - deps.addAll(configurations.snapshotApi.allDependencies.asList()) - } else { - deps.addAll(configurations.distApi.allDependencies.asList()) + pom { + name = 'adal' + description = 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' + url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android' + developers { + developer { + id = 'microsoft' + name = 'Microsoft' + } } - - //Iterate over the implementation dependencies (we don't want the test ones), adding a node for each - deps.each { - if (it.group != null && it.name != null) { - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', it.group) - dependencyNode.appendNode('artifactId', it.name) - dependencyNode.appendNode('version', it.version) + licenses { + license { + name = 'MIT License' } } - + inceptionYear = '2014' + scm { + url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master' + } + properties = [ + branch : 'master', + version: project.version + ] } - artifact(sourcesJar) - artifact(javadocJar) - artifact("$buildDir/outputs/aar/adal-${project.version}.aar") +// artifact(sourcesJar) +// artifact(javadocJar) +// artifact("$buildDir/outputs/aar/adal-${project.version}.aar") } } @@ -315,10 +295,10 @@ def getTimestamp() { return date.format('yyyyMMdd.HHmm') } -artifacts { - archives javadocJar - archives sourcesJar -} +//artifacts { +// archives javadocJar +// archives sourcesJar +//} pmd { ignoreFailures = false diff --git a/common b/common index 48240ad49..0ef5b4f73 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 48240ad49e65699326e50ff5fc55ee394d5ad450 +Subproject commit 0ef5b4f739da002934fbc8d20f8867951a2db3ec From 42a7b69a0a6a812df3dcf753519d5a00dd35659c Mon Sep 17 00:00:00 2001 From: Melissa Ahn Date: Wed, 17 Apr 2024 15:59:52 -0700 Subject: [PATCH 2/7] kotlin bump --- common | 2 +- gradle/versions.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common b/common index 0ef5b4f73..c1006c037 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 0ef5b4f739da002934fbc8d20f8867951a2db3ec +Subproject commit c1006c037ad714d1e817d84c7cc4d8be56dff07c diff --git a/gradle/versions.gradle b/gradle/versions.gradle index c8c4c5377..6c53b9284 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -11,7 +11,7 @@ ext { // Plugins gradleVersion = '7.4.2' - kotlinVersion = '1.7.21' + kotlinVersion = '1.8.22' spotBugsGradlePluginVersion = '4.7.1' jupiterApiVersion = '5.6.0' From 6fff064f64600bf726694d7cffaa78023bef076d Mon Sep 17 00:00:00 2001 From: Melissa Ahn Date: Fri, 19 Apr 2024 11:12:06 -0700 Subject: [PATCH 3/7] reverting some changes --- adal/build.gradle | 95 +++++++++++++++++++++++++++++++++--------- common | 2 +- gradle/versions.gradle | 2 +- 3 files changed, 77 insertions(+), 22 deletions(-) diff --git a/adal/build.gradle b/adal/build.gradle index ea9c34ac0..756159252 100644 --- a/adal/build.gradle +++ b/adal/build.gradle @@ -233,31 +233,86 @@ publishing { //Edit the 'version' here for VSTS RC build version = project.version - pom { - name = 'adal' - description = 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' - url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android' - developers { - developer { - id = 'microsoft' - name = 'Microsoft' - } + pom.withXml { + // Custom values + + // Name + asNode().appendNode('name', 'adal') + + // Description + asNode().appendNode( + 'description', + 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' + ) + + // URL + asNode().appendNode('url', 'https://github.com/AzureAD/azure-activedirectory-library-for-android') + + // Inception Year + asNode().appendNode('inceptionYear', '2014') + + // Licenses + asNode().appendNode('licenses').appendNode('license').appendNode('name', 'MIT License') + + // Developers + def developerNode = asNode().appendNode('developers').appendNode('developer') + developerNode.appendNode('id', 'microsoft') + developerNode.appendNode('name', 'Microsoft') + + // SCM + asNode().appendNode('scm').appendNode('url', 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master') + + // Properties + def propertiesNode = asNode().appendNode('properties') + propertiesNode.appendNode('branch', 'master') + propertiesNode.appendNode('version', project.version) + + def dependenciesNode = asNode().appendNode('dependencies') + + def deps = configurations.implementation.allDependencies.asList() + if (project.version.toString().endsWith("SNAPSHOT")) { + deps.addAll(configurations.snapshotApi.allDependencies.asList()) + } else { + deps.addAll(configurations.distApi.allDependencies.asList()) } - licenses { - license { - name = 'MIT License' + + //Iterate over the implementation dependencies (we don't want the test ones), adding a node for each + deps.each { + if (it.group != null && it.name != null) { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) } } - inceptionYear = '2014' - scm { - url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master' - } - properties = [ - branch : 'master', - version: project.version - ] + } +// pom { +// name = 'adal' +// description = 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' +// url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android' +// developers { +// developer { +// id = 'microsoft' +// name = 'Microsoft' +// } +// } +// licenses { +// license { +// name = 'MIT License' +// } +// } +// inceptionYear = '2014' +// scm { +// url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master' +// } +// properties = [ +// branch : 'master', +// version: project.version +// ] +// } + // artifact(sourcesJar) // artifact(javadocJar) // artifact("$buildDir/outputs/aar/adal-${project.version}.aar") diff --git a/common b/common index c1006c037..f6cc2db8c 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit c1006c037ad714d1e817d84c7cc4d8be56dff07c +Subproject commit f6cc2db8c9899eebe7abf27544fe2232bfb5d21a diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 6c53b9284..c8c4c5377 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -11,7 +11,7 @@ ext { // Plugins gradleVersion = '7.4.2' - kotlinVersion = '1.8.22' + kotlinVersion = '1.7.21' spotBugsGradlePluginVersion = '4.7.1' jupiterApiVersion = '5.6.0' From 4dbbdb011541566faeabd870a72550acb5ff374c Mon Sep 17 00:00:00 2001 From: Melissa Ahn Date: Thu, 25 Apr 2024 07:56:21 -0700 Subject: [PATCH 4/7] pom --- adal/build.gradle | 95 ++++++++++------------------------------------- 1 file changed, 20 insertions(+), 75 deletions(-) diff --git a/adal/build.gradle b/adal/build.gradle index 1404f1f40..a909f6a65 100644 --- a/adal/build.gradle +++ b/adal/build.gradle @@ -235,86 +235,31 @@ publishing { //Edit the 'version' here for VSTS RC build version = project.version - pom.withXml { - // Custom values - - // Name - asNode().appendNode('name', 'adal') - - // Description - asNode().appendNode( - 'description', - 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' - ) - - // URL - asNode().appendNode('url', 'https://github.com/AzureAD/azure-activedirectory-library-for-android') - - // Inception Year - asNode().appendNode('inceptionYear', '2014') - - // Licenses - asNode().appendNode('licenses').appendNode('license').appendNode('name', 'MIT License') - - // Developers - def developerNode = asNode().appendNode('developers').appendNode('developer') - developerNode.appendNode('id', 'microsoft') - developerNode.appendNode('name', 'Microsoft') - - // SCM - asNode().appendNode('scm').appendNode('url', 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master') - - // Properties - def propertiesNode = asNode().appendNode('properties') - propertiesNode.appendNode('branch', 'master') - propertiesNode.appendNode('version', project.version) - - def dependenciesNode = asNode().appendNode('dependencies') - - def deps = configurations.implementation.allDependencies.asList() - if (project.version.toString().endsWith("SNAPSHOT")) { - deps.addAll(configurations.snapshotApi.allDependencies.asList()) - } else { - deps.addAll(configurations.distApi.allDependencies.asList()) + pom { + name = 'adal' + description = 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' + url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android' + developers { + developer { + id = 'microsoft' + name = 'Microsoft' + } } - - //Iterate over the implementation dependencies (we don't want the test ones), adding a node for each - deps.each { - if (it.group != null && it.name != null) { - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', it.group) - dependencyNode.appendNode('artifactId', it.name) - dependencyNode.appendNode('version', it.version) + licenses { + license { + name = 'MIT License' } } - + inceptionYear = '2014' + scm { + url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master' + } + properties = [ + branch : 'master', + version: project.version + ] } -// pom { -// name = 'adal' -// description = 'Azure active directory library for Android gives you the ability to add Windows Azure Active Directory authentication to your application with just a few lines of additional code. Using our ADAL SDKs you can quickly and easily extend your existing application to all the employees that use Windows Azure AD and Active Directory on-premises using Active Directory Federation Services, including Office365 customers.' -// url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android' -// developers { -// developer { -// id = 'microsoft' -// name = 'Microsoft' -// } -// } -// licenses { -// license { -// name = 'MIT License' -// } -// } -// inceptionYear = '2014' -// scm { -// url = 'https://github.com/AzureAD/azure-activedirectory-library-for-android/tree/master' -// } -// properties = [ -// branch : 'master', -// version: project.version -// ] -// } - // artifact(sourcesJar) // artifact(javadocJar) // artifact("$buildDir/outputs/aar/adal-${project.version}.aar") From fe0608b112e7fbad33cd3c16f7dec1c1482cded7 Mon Sep 17 00:00:00 2001 From: Melissa Ahn Date: Thu, 23 May 2024 11:55:26 -0700 Subject: [PATCH 5/7] removing comments --- adal/build.gradle | 48 ----------------------------------------------- common | 2 +- 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/adal/build.gradle b/adal/build.gradle index a909f6a65..c9043a4ef 100644 --- a/adal/build.gradle +++ b/adal/build.gradle @@ -122,12 +122,6 @@ android { disable 'PackageManagerGetSignatures' } -// libraryVariants.all { variant -> -// variant.outputs.all { -// outputFileName = "${archivesBaseName}-${version}.aar" -// } -// } - useLibrary 'android.test.mock' publishing { @@ -190,39 +184,6 @@ dependencies { javadocDeps "androidx.legacy:legacy-support-v4:$rootProject.ext.legacySupportV4Version" } -//task sourcesJar(type: Jar) { -// from android.sourceSets.main.java.srcDirs -// classifier 'sources' -// destinationDirectory = reporting.file("$project.buildDir/outputs/jar/") -//} -// -//task javadoc(type: Javadoc) { -// failOnError false -// source = android.sourceSets.main.java.srcDirs -// configurations.implementation.setCanBeResolved(true) -// classpath += configurations.implementation -// classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) -// classpath += configurations.javadocDeps -// exclude '**/*.aidl' -// -// if (JavaVersion.current().isJava8Compatible()) { -// allprojects { -// tasks.withType(Javadoc) { -// options.addStringOption('Xdoclint:none', '-quiet') -// } -// } -// } -// -// destinationDir = reporting.file("$project.buildDir/outputs/jar/javadoc/") -//} -// -//tasks.register('javadocJar', Jar) { -// dependsOn javadoc -// classifier 'javadoc' -// from javadoc.destinationDir -// destinationDirectory = reporting.file("$project.buildDir/outputs/jar/") -//} - // For publishing to the remote maven repo. publishing { publications { @@ -259,10 +220,6 @@ publishing { version: project.version ] } - -// artifact(sourcesJar) -// artifact(javadocJar) -// artifact("$buildDir/outputs/aar/adal-${project.version}.aar") } } @@ -297,11 +254,6 @@ def getTimestamp() { return date.format('yyyyMMdd.HHmm') } -//artifacts { -// archives javadocJar -// archives sourcesJar -//} - pmd { ignoreFailures = false reportsDir = file("$project.buildDir/outputs/") diff --git a/common b/common index 0d09f37da..50f291e01 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 0d09f37dac293558e59adeaafddecd1475774e90 +Subproject commit 50f291e010bfb71138b9876ef8564fd5e5089d94 From 927c8d4b7ffe9a6455f585022f265db9eeceb8e6 Mon Sep 17 00:00:00 2001 From: Melissa Ahn Date: Thu, 23 May 2024 11:56:40 -0700 Subject: [PATCH 6/7] changelog --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index 37e7c8d7d..9625bc122 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,6 @@ V.Next --------- +- [PATCH] Update publishing tasks (#1792) Version 4.8.9 --------- From b0a0fb7531c61f70f40aec609c3b62cf64687ac0 Mon Sep 17 00:00:00 2001 From: Melissa Ahn Date: Tue, 28 May 2024 14:57:17 -0700 Subject: [PATCH 7/7] submodule --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index 50f291e01..5ba4ad470 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 50f291e010bfb71138b9876ef8564fd5e5089d94 +Subproject commit 5ba4ad470f1c546bc5b6bee51d6b1c68f29c6687