51 lines
1.2 KiB
Groovy
51 lines
1.2 KiB
Groovy
apply plugin: 'com.android.library'
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
|
|
|
group = 'com.github.status-im'
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
defaultConfig {
|
|
minSdkVersion 19
|
|
targetSdkVersion 28
|
|
versionCode 201
|
|
versionName "2.0.1"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api project(':lib')
|
|
}
|
|
|
|
// build a jar with source files
|
|
task sourcesJar(type: Jar) {
|
|
from android.sourceSets.main.java.srcDirs
|
|
classifier = 'sources'
|
|
}
|
|
|
|
task javadoc(type: Javadoc) {
|
|
failOnError false
|
|
source = android.sourceSets.main.java.sourceFiles
|
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
|
classpath += configurations.compile
|
|
}
|
|
|
|
// build a jar with javadoc
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
android.libraryVariants.all { variant ->
|
|
def name = variant.buildType.name
|
|
def task = project.tasks.create "jar${name.capitalize()}", Jar
|
|
task.dependsOn variant.javaCompile
|
|
task.from variant.javaCompile.destinationDir
|
|
artifacts.add('archives', task);
|
|
}
|