From b03f1d495ae65fd88bdd3ee7e496665ae9721c0f Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Tue, 15 Aug 2023 13:30:08 +0200 Subject: [PATCH] - adjust publishing logic --- gradle-release.gradle | 31 ++++++----------------------- materialdrawer-iconics/build.gradle | 7 +++++++ materialdrawer-nav/build.gradle | 7 +++++++ materialdrawer/build.gradle | 7 +++++++ 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/gradle-release.gradle b/gradle-release.gradle index ea06a59d..fa925949 100644 --- a/gradle-release.gradle +++ b/gradle-release.gradle @@ -15,31 +15,15 @@ def getRepositoryPassword() { return project.hasProperty('NEXUS_PASSWORD') ? project.property('NEXUS_PASSWORD') : System.getenv('NEXUS_PASSWORD') } -afterEvaluate { project -> - if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } +if (JavaVersion.current().isJava8Compatible()) { + allprojects { + tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') } } +} - task androidJavadocs(type: Javadoc) { - failOnError = false - source = android.sourceSets.main.java.source - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - } - - task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { - archiveClassifier = 'javadoc' - from androidJavadocs.destinationDir - } - - task androidSourcesJar(type: Jar) { - archiveClassifier = 'sources' - from android.sourceSets.main.java.source - } - +afterEvaluate { project -> def pomConfig = { licenses { license { @@ -71,9 +55,6 @@ afterEvaluate { project -> artifactId POM_ARTIFACT_ID version android.defaultConfig.versionName - artifact androidSourcesJar - artifact androidJavadocsJar - pom.withXml { asNode().appendNode('name', POM_NAME) asNode().appendNode('description', POM_DESCRIPTION) diff --git a/materialdrawer-iconics/build.gradle b/materialdrawer-iconics/build.gradle index 381a3777..cca4787d 100644 --- a/materialdrawer-iconics/build.gradle +++ b/materialdrawer-iconics/build.gradle @@ -37,6 +37,13 @@ android { freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID] // specify the artifactId as module-name for kotlin jvmTarget = "11" } + + publishing { + singleVariant("release") { + withJavadocJar() + withSourcesJar() + } + } } dependencies { diff --git a/materialdrawer-nav/build.gradle b/materialdrawer-nav/build.gradle index 2afb16e0..d9b52bd7 100644 --- a/materialdrawer-nav/build.gradle +++ b/materialdrawer-nav/build.gradle @@ -37,6 +37,13 @@ android { freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID] // specify the artifactId as module-name for kotlin jvmTarget = "11" } + + publishing { + singleVariant("release") { + withJavadocJar() + withSourcesJar() + } + } } dependencies { diff --git a/materialdrawer/build.gradle b/materialdrawer/build.gradle index 46f74944..ddc90602 100644 --- a/materialdrawer/build.gradle +++ b/materialdrawer/build.gradle @@ -39,6 +39,13 @@ android { freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID] // specify the artifactId as module-name for kotlin jvmTarget = "11" } + + publishing { + singleVariant("release") { + withJavadocJar() + withSourcesJar() + } + } } dependencies {