Bump gradle and android dependencies

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
This commit is contained in:
Pascal Hartig
2017-04-19 10:48:59 -07:00
committed by Facebook Github Bot
parent 3569a13b74
commit eacf3cdbb4
3 changed files with 28 additions and 31 deletions

View File

@@ -1,31 +1,28 @@
apply plugin: "com.jfrog.bintray" apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
version = '1.4.1' version = '1.4.1'
group = 'com.facebook.yoga.android' group = 'com.facebook.yoga.android'
android { android {
compileSdkVersion 19 compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion "19.1.0" buildToolsVersion rootProject.buildToolsVersion
defaultConfig { defaultConfig {
minSdkVersion 15 minSdkVersion rootProject.minSdkVersion
targetSdkVersion 19 targetSdkVersion rootProject.targetSdkVersion
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility rootProject.targetCompatibilityVersion
targetCompatibility JavaVersion.VERSION_1_7 sourceCompatibility rootProject.sourceCompatibilityVersion
} }
} }
dependencies { dependencies {
compile 'com.facebook.yoga:yoga:1.4.1' compile project(':yoga')
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {
@@ -46,7 +43,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
} }
ext { ext {
bintrayName = "com.facebook.yoga.android:yoga-layout" bintrayName = 'com.facebook.yoga.android:yoga-layout'
} }
apply from: rootProject.file('gradle/android-jcenter-install.gradle') apply from: rootProject.file('gradle/android-jcenter-install.gradle')

View File

@@ -18,15 +18,18 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter() jcenter()
flatDir {
dirs "${rootDir}/lib/jsr-305"
dirs "${rootDir}/lib/soloader"
dirs "${rootDir}/lib/appcompat"
dirs "${rootDir}/lib/android-support"
}
} }
} }
ext {
minSdkVersion = 15
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
}
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

View File

@@ -3,9 +3,6 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
version = '1.4.2' version = '1.4.2'
group = 'com.facebook.yoga' group = 'com.facebook.yoga'
@@ -16,17 +13,17 @@ task buckBuildAndCopy(type: Exec) {
} }
android { android {
compileSdkVersion 19 compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion "19.1.0" buildToolsVersion rootProject.buildToolsVersion
defaultConfig { defaultConfig {
minSdkVersion 15 minSdkVersion rootProject.minSdkVersion
targetSdkVersion 19 targetSdkVersion rootProject.targetSdkVersion
} }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility rootProject.targetCompatibilityVersion
targetCompatibility JavaVersion.VERSION_1_7 sourceCompatibility rootProject.sourceCompatibilityVersion
} }
sourceSets { sourceSets {
@@ -42,9 +39,9 @@ android {
preBuild.dependsOn buckBuildAndCopy preBuild.dependsOn buckBuildAndCopy
dependencies { dependencies {
compile(name: 'jsr305') compile 'com.google.code.findbugs:jsr305:3.0.1'
compile(name: 'soloader-0.1.0', ext: 'aar') compile 'com.facebook.soloader:soloader:0.2.0'
provided(project(':yoga:proguard-annotations')) provided project(':yoga:proguard-annotations')
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {
@@ -65,7 +62,7 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
} }
ext { ext {
bintrayName = "com.facebook.yoga:yoga" bintrayName = 'com.facebook.yoga:yoga'
} }
apply from: rootProject.file('gradle/android-jcenter-install.gradle') apply from: rootProject.file('gradle/android-jcenter-install.gradle')