Skip to content

Commit

Permalink
- adjust publishing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Aug 15, 2023
1 parent fe7faab commit b03f1d4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
31 changes: 6 additions & 25 deletions gradle-release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions materialdrawer-iconics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 7 additions & 0 deletions materialdrawer-nav/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 7 additions & 0 deletions materialdrawer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b03f1d4

Please sign in to comment.