Skip to content

Commit

Permalink
[android] Upgrade gradle project
Browse files Browse the repository at this point in the history
Summary:
Makes us compatible with Android Studio Flamingo and unlocks upgrades to Kotlin
(which we need to be in sync with fbsource).

Test Plan:
- ./gradlew :android:assembleDebug
- Android Studio Sync
- CI

Tasks: T153938450

Tags:
  • Loading branch information
passy committed May 22, 2023
1 parent 5be3b4b commit 445b5f1
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlinx-serialization'

android {
namespace 'com.facebook.flipper'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
Expand Down
8 changes: 1 addition & 7 deletions android/no-op/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.facebook.flipper'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

Expand All @@ -30,10 +31,3 @@ android {
}

apply plugin: 'com.vanniktech.maven.publish'

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts.add('archives', sourcesJar)
1 change: 1 addition & 0 deletions android/plugins/leakcanary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.facebook.flipper.plugins.leakcanary'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

Expand Down
1 change: 1 addition & 0 deletions android/plugins/leakcanary2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
namespace 'com.facebook.flipper.plugins.leakcanary2'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

Expand Down
1 change: 1 addition & 0 deletions android/plugins/litho/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
namespace 'com.facebook.flipper.plugins.litho'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

Expand Down
1 change: 1 addition & 0 deletions android/plugins/network/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.facebook.flipper.plugins.network'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

Expand Down
1 change: 1 addition & 0 deletions android/plugins/retrofit2-protobuf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
namespace 'com.facebook.flipper.plugins.retrofit2protobuf'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

Expand Down
1 change: 1 addition & 0 deletions android/sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.application'

android {
namespace 'com.facebook.flipper.sample'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
Expand Down
1 change: 1 addition & 0 deletions android/third-party/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ apply plugin: 'com.android.library'
apply from: 'native.gradle'

android {
namespace 'com.facebook.flipper.thirdparty'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.doubleconversion'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
Expand Down
1 change: 1 addition & 0 deletions android/third-party/overrides/Folly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.folly'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
Expand Down
1 change: 1 addition & 0 deletions android/third-party/overrides/LibEvent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.libevent'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
Expand Down
1 change: 1 addition & 0 deletions android/third-party/overrides/glog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.glog'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
Expand Down
1 change: 1 addition & 0 deletions android/tutorial/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
namespace 'com.facebook.flipper.sample.tutorial'

defaultConfig {
applicationId "com.facebook.flipper.sample.tutorial"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.0'
classpath 'com.android.tools.build:gradle:8.0.1'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.25.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ systemProp.org.gradle.internal.http.connectionTimeout=120000
systemProp.org.gradle.internal.http.socketTimeout=120000
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionSha256Sum=cb87f222c5585bd46838ad4db78463a5c5f3d336e5e2b98dc7c0c586527351c2
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions xplat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
apply plugin: 'com.android.library'

android {
namespace 'com.facebook.xplat.sonar'
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
Expand Down

0 comments on commit 445b5f1

Please sign in to comment.