Summary: Adds a buildscript for gradle as well as bintray upload capabilities for the YogaLayout library Reviewed By: emilsjolander Differential Revision: D4604712 fbshipit-source-id: bacbcc20b7ed6ee8689130287a48bd5d3826298c
71 lines
1.6 KiB
Groovy
71 lines
1.6 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.0.0'
|
|
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 '../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')
|
|
}
|
|
|
|
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')
|