Summary: By declaring the properties first, before using them in the scripts, you no longer get an exception if you fail to specify them. You can now build artifacts or run tests without specifying your bintray password, which is probably what you want. Reviewed By: emilsjolander Differential Revision: D4913103 fbshipit-source-id: 8787af8973cebb84cd59e18c63a3a9f28e0ec348
72 lines
1.7 KiB
Groovy
72 lines
1.7 KiB
Groovy
apply plugin: 'com.jfrog.bintray'
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
|
apply plugin: 'maven-publish'
|
|
|
|
targetCompatibility = '1.7'
|
|
sourceCompatibility = '1.7'
|
|
|
|
version = '1.4.2'
|
|
group = 'com.facebook.yoga'
|
|
|
|
// We currently build the native libraries with buck and bundle them together
|
|
// at this point into the AAR
|
|
task buckBuildAndCopy(type: Exec) {
|
|
commandLine "$rootDir/scripts/build_natives_for_gradle.sh"
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 19
|
|
buildToolsVersion "19.1.0"
|
|
|
|
defaultConfig {
|
|
minSdkVersion 15
|
|
targetSdkVersion 19
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java.srcDir 'com'
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
res.srcDirs = ['res']
|
|
jniLibs.srcDirs = ['build/buck-out/jniLibs']
|
|
}
|
|
}
|
|
}
|
|
|
|
preBuild.dependsOn buckBuildAndCopy
|
|
|
|
dependencies {
|
|
compile(name: 'jsr305')
|
|
compile(name: 'soloader-0.1.0', ext: 'aar')
|
|
provided(project(':yoga:proguard-annotations'))
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'source'
|
|
from android.sourceSets.main.java.srcDirs
|
|
}
|
|
|
|
task javadoc(type: Javadoc) {
|
|
failOnError false
|
|
source = android.sourceSets.main.java.sourceFiles
|
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
|
classpath += configurations.compile
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
ext {
|
|
bintrayName = "com.facebook.yoga:yoga"
|
|
}
|
|
|
|
apply from: rootProject.file('gradle/android-jcenter-install.gradle')
|