AGP to 8.0.1 (#1280)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1280

I'm refreshing some of the dependencies of the project,
here doing AGP to 8.0.1.
I'm also removing the older publishing plugin as we're most likely going to use
Gradle's default publishing + another plugin to manage the nexus interactions (the same we use on React Native).

I'm also doing some changes on the JDK side:
- Bumps the JDK version to 17 as that's required by AGP
- Bumps the source/target version to JDK 8. JDK 7 is long deprecated and we're getting a lot of warnings for it on console. Users should be on JDK 11 already by now, but 8 is also good enough.

Reviewed By: passy

Differential Revision: D45564575

fbshipit-source-id: ffe1cc15892659923177a2cad609d5d30f8249ac
This commit is contained in:
Nicola Corti
2023-05-05 04:07:40 -07:00
committed by Facebook GitHub Bot
parent 3a69a040c4
commit 54d78926ce
4 changed files with 19 additions and 10 deletions

View File

@@ -6,5 +6,5 @@ runs:
- name: Select Java Version - name: Select Java Version
uses: actions/setup-java@v2 uses: actions/setup-java@v2
with: with:
distribution: temurin distribution: zulu
java-version: 11 java-version: 17

View File

@@ -23,6 +23,13 @@ android {
targetCompatibility rootProject.targetCompatibilityVersion targetCompatibility rootProject.targetCompatibilityVersion
sourceCompatibility rootProject.sourceCompatibilityVersion sourceCompatibility rootProject.sourceCompatibilityVersion
} }
publishing {
multipleVariants {
withSourcesJar()
includeBuildTypeValues('debug', 'release')
}
}
} }
dependencies { dependencies {
@@ -34,5 +41,3 @@ dependencies {
tasks.withType(Javadoc).all { tasks.withType(Javadoc).all {
enabled = false enabled = false
} }
apply plugin: 'com.vanniktech.maven.publish'

View File

@@ -13,8 +13,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.3.1' classpath 'com.android.tools.build:gradle:8.0.1'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.15.1'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }
@@ -34,8 +33,8 @@ ext {
minSdkVersion = 21 minSdkVersion = 21
compileSdkVersion = 33 compileSdkVersion = 33
targetSdkVersion = 33 targetSdkVersion = 33
sourceCompatibilityVersion = JavaVersion.VERSION_1_7 sourceCompatibilityVersion = JavaVersion.VERSION_1_8
targetCompatibilityVersion = JavaVersion.VERSION_1_7 targetCompatibilityVersion = JavaVersion.VERSION_1_8
} }
task clean(type: Delete) { task clean(type: Delete) {

View File

@@ -45,6 +45,13 @@ android {
res.srcDirs = ['res'] res.srcDirs = ['res']
} }
} }
publishing {
multipleVariants {
withSourcesJar()
includeBuildTypeValues('debug', 'release')
}
}
} }
dependencies { dependencies {
@@ -52,5 +59,3 @@ dependencies {
implementation 'com.facebook.soloader:soloader:0.10.4' implementation 'com.facebook.soloader:soloader:0.10.4'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
} }
apply plugin: 'com.vanniktech.maven.publish'