Skip to content

Commit

Permalink
Remove unwanted code
Browse files Browse the repository at this point in the history
  • Loading branch information
li-advait committed Nov 12, 2024
1 parent 54db3fe commit da8f3f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
34 changes: 16 additions & 18 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ tasks.register("sourcesJar", Jar) {
from android.sourceSets.main.java.srcDirs
}

tasks.register('androidJavadocs', Javadoc) {
failOnError false
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
android.libraryVariants.all { variant ->
if (variant.name == 'release') {
owner.classpath += variant.javaCompileProvider.get().classpath
}
}
exclude '**/R.html', '**/R.*.html', '**/index.html'
}

tasks.register('androidJavadocsJar', Jar) {
dependsOn androidJavadocs
archiveClassifier.set('javadoc')
from androidJavadocs.destinationDir
}
//tasks.register('androidJavadocs', Javadoc) {
// failOnError false
// source = android.sourceSets.main.java.srcDirs
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
// android.libraryVariants.all { variant ->
// if (variant.name == 'release') {
// owner.classpath += variant.javaCompileProvider.get().classpath
// }
// }
// exclude '**/R.html', '**/R.*.html', '**/index.html'
//}
//
//tasks.register('androidJavadocsJar', Jar) {
// dependsOn androidJavadocs
// from androidJavadocs.destinationDir
//}

// AGP creates the components in afterEvaluate, so we need to use it too
// https://developer.android.com/studio/build/maven-publish-plugin
Expand All @@ -35,7 +34,6 @@ afterEvaluate {
from(components["release"])
// Adds javadocs and sources as separate jars.
artifact sourcesJar
artifact androidJavadocsJar
pom {
name = 'Shaky'
description = 'Shake-to-send-feedback library for Android'
Expand Down
3 changes: 0 additions & 3 deletions shaky/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ android {

publishing {
singleVariant("release") {
// if you don't want sources/javadoc, remove these lines
withSourcesJar()
withJavadocJar()
}
}

Expand Down

0 comments on commit da8f3f5

Please sign in to comment.