Skip to content

Commit

Permalink
include source and java doc for other modules too
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Sharat committed Mar 1, 2017
1 parent f8d7151 commit 481fde0
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
26 changes: 26 additions & 0 deletions gson-adapter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,32 @@ android {
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant ->
variant.javaCompile.classpath.files
})
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':proteus-core')
Expand Down
26 changes: 26 additions & 0 deletions support-v4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,32 @@ android {
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant ->
variant.javaCompile.classpath.files
})
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
Expand Down

0 comments on commit 481fde0

Please sign in to comment.