Summary: We need to use the most recent Android SDK to leverage the cmake-based NDK build system. Also, since everything seems to be still working - why not? I also changed the dependency of `yoga-layout` to be the project, not the pre-published artifact as it no longer compiled due to the changed measure API signature. I'm not sure if there was a reason to keep the two separate. By relying on Maven-published artifacts, we generate better POMs when publishing and people can override dependencies and see them more easily. A few more cleanups based on what we did with Litho. Reviewed By: emilsjolander Differential Revision: D4913208 fbshipit-source-id: 053deb444ce91106afb3b66c3be28d6fcbdea450
69 lines
1.8 KiB
Groovy
69 lines
1.8 KiB
Groovy
apply plugin: 'com.jfrog.bintray'
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
|
apply plugin: 'maven-publish'
|
|
|
|
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 rootProject.compileSdkVersion
|
|
buildToolsVersion rootProject.buildToolsVersion
|
|
|
|
defaultConfig {
|
|
minSdkVersion rootProject.minSdkVersion
|
|
targetSdkVersion rootProject.targetSdkVersion
|
|
}
|
|
|
|
compileOptions {
|
|
targetCompatibility rootProject.targetCompatibilityVersion
|
|
sourceCompatibility rootProject.sourceCompatibilityVersion
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java.srcDir 'com'
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
res.srcDirs = ['res']
|
|
jniLibs.srcDirs = ['build/buck-out/jniLibs']
|
|
}
|
|
}
|
|
}
|
|
|
|
preBuild.dependsOn buckBuildAndCopy
|
|
|
|
dependencies {
|
|
compile 'com.google.code.findbugs:jsr305:3.0.1'
|
|
compile 'com.facebook.soloader:soloader:0.2.0'
|
|
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')
|