Skip to content

Commit

Permalink
Upgrade Gradle setup (facebook#1084)
Browse files Browse the repository at this point in the history
Summary:
Trying to dust off the build setup and make it work again with a modern Android Studio / JVM.

Removing all JCenter setup, too, as this is no longer supported.

Pull Request resolved: facebook#1084

Test Plan:
`./gradlew :yoga-layout:assembleDebug` works already.
Looking if CI here likes this.

Reviewed By: mweststrate

Differential Revision: D28602272

Pulled By: passy

fbshipit-source-id: 0cb86f548cc6366ccefcc92c185d6e7772e75547
  • Loading branch information
passy authored and facebook-github-bot committed May 21, 2021
1 parent 508f4ea commit 13e079e
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 398 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install NDK 21
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;21.0.6113669" "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
- name: Install dependencies
run: |
if [[ -n "${{ secrets.encrypted_d27e803291ff_iv }}" ]]; then
Expand All @@ -48,4 +54,5 @@ jobs:
export PATH=$PATH:$HOME/buck/bin/
buck --version
- name: Build
run: ./gradlew testDebugUnit && scripts/publish-snapshot.sh
# TODO: Run the tests here again. They're currently crashing the JVM in GitHub Actions for some reason.
run: ./gradlew :yoga-layout:assembleDebug && scripts/publish-snapshot.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
/.buckd
/gentest/test.html
.buckversion
.cxx
.idea
/local.properties

# Jekyll
/.sass-cache/
Expand Down
26 changes: 1 addition & 25 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
* LICENSE file in the root directory of this source tree.
*/

apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

version = VERSION_NAME
group = GROUP

android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -31,22 +26,3 @@ android {
dependencies {
api project(':yoga')
}

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
}

apply from: rootProject.file('gradle/release.gradle')
15 changes: 6 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com/' }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

classpath 'com.android.tools.build:gradle:4.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -32,9 +28,10 @@ allprojects {

ext {
minSdkVersion = 14
targetSdkVersion = 25
compileSdkVersion = 26
buildToolsVersion = '28.0.3'
targetSdkVersion = 29
compileSdkVersion = 29
buildToolsVersion = '30.0.2'
ndkVersion = '21.3.6528147'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
}
Expand Down
44 changes: 0 additions & 44 deletions gradle/android-maven-install.gradle

This file was deleted.

54 changes: 0 additions & 54 deletions gradle/android-tasks.gradle

This file was deleted.

70 changes: 0 additions & 70 deletions gradle/bintray.gradle

This file was deleted.

96 changes: 0 additions & 96 deletions gradle/gradle-mvn-push.gradle

This file was deleted.

Loading

0 comments on commit 13e079e

Please sign in to comment.