Gradle version bump and POM details
Summary: This improves the quality of the published POM files, adding dependencies and marking the object as an 'aar'. It also bumps the version to 1.2.0 for JCenter. Reviewed By: emilsjolander Differential Revision: D4620150 fbshipit-source-id: 968f1cea21af4b2f19aeff3f32ad575b185fa1bb
This commit is contained in:
committed by
Facebook Github Bot
parent
5bc0197c78
commit
abf912b729
@@ -6,7 +6,7 @@ apply plugin: 'maven-publish'
|
|||||||
targetCompatibility = '1.7'
|
targetCompatibility = '1.7'
|
||||||
sourceCompatibility = '1.7'
|
sourceCompatibility = '1.7'
|
||||||
|
|
||||||
version = '1.0.0'
|
version = '1.2.0'
|
||||||
group = 'com.facebook.yoga.android'
|
group = 'com.facebook.yoga.android'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -22,17 +22,10 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.main {
|
|
||||||
jni.srcDirs = [] // disalbe NDK auto build (not sure why this is necessary)
|
|
||||||
// The alternative, fat-aar does an equivalent thing to this hack
|
|
||||||
// seehttps://github.com/adwiv/android-fat-aar/blob/master/fat-aar.gradle#L307
|
|
||||||
jniLibs.srcDirs = ['build/intermediates/exploded-aar/com.facebook.yoga/yoga/1.0.0/jni']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':yoga')
|
compile 'com.facebook.yoga:yoga:1.2.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
|
@@ -17,6 +17,7 @@ buildscript {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
|
jcenter()
|
||||||
flatDir {
|
flatDir {
|
||||||
dirs "${rootDir}/lib/jsr-305"
|
dirs "${rootDir}/lib/jsr-305"
|
||||||
dirs "${rootDir}/lib/soloader"
|
dirs "${rootDir}/lib/soloader"
|
||||||
|
@@ -44,11 +44,22 @@ publishing {
|
|||||||
groupId group
|
groupId group
|
||||||
artifact(sourcesJar)
|
artifact(sourcesJar)
|
||||||
artifact(javadocJar)
|
artifact(javadocJar)
|
||||||
|
pom.packaging='aar'
|
||||||
pom.withXml {
|
pom.withXml {
|
||||||
def root = asNode()
|
def root = asNode()
|
||||||
root.appendNode('name', 'Yoga')
|
root.appendNode('name', 'Yoga')
|
||||||
root.appendNode('url', siteURL)
|
root.appendNode('url', siteURL)
|
||||||
root.children().last() + pomConfig
|
root.children().last() + pomConfig
|
||||||
|
def dependenciesNode = root.appendNode('dependencies')
|
||||||
|
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
|
||||||
|
configurations.compile.allDependencies.each {
|
||||||
|
if(it.group != null && (it.name != null || "unspecified".equals(it.name)) && it.version != null) {
|
||||||
|
def dependencyNode = dependenciesNode.appendNode('dependency')
|
||||||
|
dependencyNode.appendNode('groupId', it.group)
|
||||||
|
dependencyNode.appendNode('artifactId', it.name)
|
||||||
|
dependencyNode.appendNode('version', it.version)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6,7 +6,7 @@ apply plugin: 'maven-publish'
|
|||||||
targetCompatibility = '1.7'
|
targetCompatibility = '1.7'
|
||||||
sourceCompatibility = '1.7'
|
sourceCompatibility = '1.7'
|
||||||
|
|
||||||
version = '1.0.0'
|
version = '1.2.0'
|
||||||
group = 'com.facebook.yoga'
|
group = 'com.facebook.yoga'
|
||||||
|
|
||||||
// We currently build the native libraries with buck and bundle them together
|
// We currently build the native libraries with buck and bundle them together
|
||||||
|
@@ -3,14 +3,19 @@
|
|||||||
buck build //android:android
|
buck build //android:android
|
||||||
|
|
||||||
X86_DEST=build/buck-out/jniLibs/x86
|
X86_DEST=build/buck-out/jniLibs/x86
|
||||||
ARMV7_DEST=build/buck-out/jniLibs/armabi-v7a
|
ARMV7_DEST=build/buck-out/jniLibs/armeabi-v7a
|
||||||
|
|
||||||
mkdir -p $X86_DEST
|
mkdir -p $X86_DEST
|
||||||
mkdir -p $ARMV7_DEST
|
mkdir -p $ARMV7_DEST
|
||||||
|
|
||||||
cp ../buck-out/gen/java/jni#android-armv7,shared/libyoga.so $ARMV7_DEST
|
cp ../buck-out/gen/java/jni#ARMV7,android-armv7,android-strip,libyoga.so,shared/libyoga.so $ARMV7_DEST
|
||||||
cp ../buck-out/gen/java/jni#android-x86,shared/libyoga.so $X86_DEST
|
cp ../buck-out/gen/java/jni#X86,android-strip,android-x86,libyoga.so,shared/libyoga.so $X86_DEST
|
||||||
|
|
||||||
cp ../buck-out/gen/yoga#android-armv7,shared/libyogacore.so $ARMV7_DEST
|
cp ../buck-out/gen/yoga#ARMV7,android-armv7,android-strip,libyogacore.so,shared/libyogacore.so $ARMV7_DEST
|
||||||
cp ../buck-out/gen/yoga#android-x86,shared/libyogacore.so $X86_DEST
|
cp ../buck-out/gen/yoga#X86,android-strip,android-x86,libyogacore.so,shared/libyogacore.so $X86_DEST
|
||||||
|
|
||||||
|
cp ../buck-out/gen/lib/fb/fbjni#ARMV7,android-armv7,android-strip,liblib_fb_fbjni.so,shared/liblib_fb_fbjni.so $ARMV7_DEST
|
||||||
|
cp ../buck-out/gen/lib/fb/fbjni#X86,android-strip,android-x86,liblib_fb_fbjni.so,shared/liblib_fb_fbjni.so $X86_DEST
|
||||||
|
|
||||||
|
cp ../buck-out/gen/android/android#ARMV7,android-strip,libgnustl_shared.so/libgnustl_shared.so $ARMV7_DEST
|
||||||
|
cp ../buck-out/gen/android/android#X86,android-strip,libgnustl_shared.so/libgnustl_shared.so $X86_DEST
|
||||||
|
Reference in New Issue
Block a user