Skip to content

Commit

Permalink
Bump Android SDK to 28, Build Tools to 28.0.2, Gradle to 4.7, Gradle …
Browse files Browse the repository at this point in the history
…Plugin to 3.2.0 (facebook#21632)

Summary:
This PR is bumping compileSdkVersion to 28, buildToolsVersion to 28.0.2, Gradle to 4.7, Android Gradle plugin to 3.2.0.

Gradle 4.7 added support for Java 10 and 11.

allow-large-files

Release Notes:
--------------
[ANDROID] [ENHANCEMENT] [SDK] - bump to 28

Pull Request resolved: facebook#21632

Reviewed By: mdvacca

Differential Revision: D13084836

Pulled By: hramos

fbshipit-source-id: e0f493881e80e87faf8c3ef1ac77044495966a49
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Dec 5, 2018
1 parent c45d290 commit 9d00d4d
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .buckconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[android]
target = android-27
target = android-28

[download]
max_number_of_retries = 3
Expand Down
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ aliases:

- &restore-cache-android-packages
keys:
- v1-android-sdkmanager-packages-api-27-alpha-{{ checksum "scripts/.tests.env" }}
- v1-android-sdkmanager-packages-api-28-alpha-{{ checksum "scripts/.tests.env" }}
- &save-cache-android-packages
paths:
- /opt/android/sdk
key: v1-android-sdkmanager-packages-api-27-alpha-{{ checksum "scripts/.tests.env" }}
key: v1-android-sdkmanager-packages-api-28-alpha-{{ checksum "scripts/.tests.env" }}

- &restore-cache-gradle
keys:
Expand Down Expand Up @@ -344,7 +344,7 @@ js_defaults: &js_defaults
android_defaults: &android_defaults
<<: *defaults
docker:
- image: circleci/android:api-27-node8-alpha
- image: circleci/android:api-28-node8-alpha
resource_class: "large"
environment:
- TERM: "dumb"
Expand Down
4 changes: 2 additions & 2 deletions ContainerShip/Dockerfile.android-base
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ LABEL maintainer="Héctor Ramos <[email protected]>"

# set default build arguments
ARG SDK_VERSION=sdk-tools-linux-3859397.zip
ARG ANDROID_BUILD_VERSION=27
ARG ANDROID_TOOLS_VERSION=27.0.3
ARG ANDROID_BUILD_VERSION=28
ARG ANDROID_TOOLS_VERSION=28.0.2
ARG BUCK_VERSION=v2018.10.29.01
ARG NDK_VERSION=17c
ARG NODE_VERSION=8.10.0
Expand Down
4 changes: 2 additions & 2 deletions RNTester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def enableSeparateBuildPerCPUArchitecture = true
def enableProguardInReleaseBuilds = true

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion 28
buildToolsVersion "28.0.2"

defaultConfig {
applicationId "com.facebook.react.uiapp"
Expand Down
4 changes: 2 additions & 2 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ task packageReactNdkLibsForBuck(dependsOn: packageReactNdkLibs, type: Copy) {
}

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion 28
buildToolsVersion "28.0.2"

defaultConfig {
minSdkVersion 16
Expand Down
48 changes: 48 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
environment:
ANDROID_HOME: "C:\\android-sdk-windows"
ANDROID_NDK: "C:\\android-sdk-windows\\android-ndk-r17b"
ANDROID_BUILD_VERSION: 28
ANDROID_TOOLS_VERSION: 28.0.2

GRADLE_OPTS: -Dorg.gradle.daemon=false

SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip
NDK_TOOLS_URL: https://dl.google.com/android/repository/android-ndk-r17c-windows-x86_64.zip

matrix:
- nodejs_version: 8
- nodejs_version: 10

install:
# Install Android SDK Tools
- mkdir "%ANDROID_HOME%"
- appveyor DownloadFile "%SDK_TOOLS_URL%" -FileName "%TMP%/sdk-tools.zip"
- 7z x "%TMP%/sdk-tools.zip" -o"%ANDROID_HOME%" > nul
- set PATH=%PATH%;"%ANDROID_HOME%\tools\bin"

- yes 2> nul | sdkmanager --licenses > nul
- sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
- sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
- sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
- sdkmanager "add-ons;addon-google_apis-google-23"
- sdkmanager "extras;android;m2repository"

- appveyor DownloadFile "%NDK_TOOLS_URL%" -FileName "%TMP%/ndk.zip"
- 7z x "%TMP%/ndk.zip" -o"%ANDROID_HOME%" > nul

- ps: Install-Product node $env:nodejs_version
- node --version
- yarn --version
- appveyor-retry yarn install

build_script:
- gradlew.bat RNTester:android:app:assembleRelease

test_script:
- npm test

cache:
- node_modules
- "%LOCALAPPDATA%/Yarn"
- "%USERPROFILE%/.gradle/caches"
- "%USERPROFILE%/.gradle/wrapper"
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'de.undercouch:gradle-download-task:3.4.3'

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -32,6 +32,6 @@ allprojects {
}

task wrapper(type: Wrapper) {
gradleVersion = '4.4'
gradleVersion = '4.7'
distributionUrl = distributionUrl.replace("bin", "all")
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
8 changes: 4 additions & 4 deletions local-cli/templates/HelloWorld/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

buildscript {
ext {
buildToolsVersion = "27.0.3"
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 27
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "27.1.1"
}
Expand All @@ -13,7 +13,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -34,6 +34,6 @@ allprojects {


task wrapper(type: Wrapper) {
gradleVersion = '4.4'
gradleVersion = '4.7'
distributionUrl = distributionUrl.replace("bin", "all")
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
4 changes: 2 additions & 2 deletions scripts/.tests.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

## ANDROID ##
# Android SDK Build Tools revision
export ANDROID_SDK_BUILD_TOOLS_REVISION=27.0.3
export ANDROID_SDK_BUILD_TOOLS_REVISION=28.0.2
# Android API Level we build with
export ANDROID_SDK_BUILD_API_LEVEL="27"
export ANDROID_SDK_BUILD_API_LEVEL="28"
# Google APIs for Android level
export ANDROID_GOOGLE_API_LEVEL="23"
# Minimum Android API Level we target
Expand Down

0 comments on commit 9d00d4d

Please sign in to comment.