diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 770454f3847..d34581c053c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 11 + java-version: 17 - name: Set up GCC uses: egor-tensin/setup-gcc@v1 with: @@ -58,7 +58,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 11 + java-version: 17 - name: Set up GCC uses: egor-tensin/setup-gcc@v1 with: @@ -116,7 +116,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 11 + java-version: 17 - name: Set up GCC uses: egor-tensin/setup-gcc@v1 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e823aac7761..b56a59d3e17 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 11 + java-version: 17 - name: Gradle caches uses: actions/cache@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 713f44e9b30..bdabff36fee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,7 +66,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: '11' + java-version: 17 - name: Setup Python uses: actions/setup-python@v4 with: @@ -95,7 +95,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: '11' + java-version: 17 - name: Setup Python uses: actions/setup-python@v4 with: @@ -120,7 +120,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: '11' + java-version: 17 - name: Setup Python uses: actions/setup-python@v4 with: diff --git a/build.gradle b/build.gradle index 00a28f2baf9..c031c9f03d8 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.1' + classpath 'com.android.tools.build:gradle:8.1.0' classpath "com.vanniktech:gradle-maven-publish-plugin:${MAVEN_PUBLISH_PLUGIN}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN_VERSION}" classpath "org.jetbrains.dokka:dokka-gradle-plugin:${DOKKA_VERSION}" @@ -43,6 +43,14 @@ allprojects { tasks.withType(Javadoc).all { options.addStringOption('Xdoclint:none', '-quiet') } + configurations.all { + // These are to prevent upgrade problems where second-party dependencies like Fresco may be + // dependencing on a specific, older version of Litho causing dex merging conflicts. + resolutionStrategy.dependencySubstitution { + substitute module('com.facebook.litho:litho-annotations') using project(':litho-annotations') + substitute module('com.facebook.litho:litho-widget') using project(':litho-widget') + } + } } subprojects { @@ -70,6 +78,18 @@ subprojects { } } + plugins.withType(org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper) { + kotlin { + jvmToolchain(11) + } + } + + plugins.withType(org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPluginWrapper) { + kotlin { + jvmToolchain(11) + } + } + afterEvaluate { tasks.withType(Test) { it.dependsOn copyYogaLibs @@ -99,8 +119,8 @@ ext { targetSdkVersion = latestSdkVersion compileSdkVersion = latestSdkVersion buildToolsVersion = '33.0.2' - sourceCompatibilityVersion = JavaVersion.VERSION_1_8 - targetCompatibilityVersion = JavaVersion.VERSION_1_8 + sourceCompatibilityVersion = JavaVersion.VERSION_11 + targetCompatibilityVersion = JavaVersion.VERSION_11 } ext.forceReleaseBuild = project.hasProperty('forceReleaseBuild') @@ -143,8 +163,8 @@ ext.deps = [ soloader : 'com.facebook.soloader:soloader:0.10.5', textlayoutbuilder : 'com.facebook.fbui.textlayoutbuilder:textlayoutbuilder:1.7.0', screenshot : 'com.facebook.testing.screenshot:core:0.5.0', - flipper : 'com.facebook.flipper:flipper:0.183.0', - flipperLithoPlugin : 'com.facebook.flipper:flipper-litho-plugin:0.183.0', + flipper : 'com.facebook.flipper:flipper:0.250.0', + flipperLithoPlugin : 'com.facebook.flipper:flipper-litho-plugin:0.250.0', // Annotations jsr305 : 'com.google.code.findbugs:jsr305:3.0.1', inferAnnotations : 'com.facebook.infer.annotation:infer-annotation:0.18.0', diff --git a/gradle.properties b/gradle.properties index 81b71bdae01..dc33ce11b22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,19 +30,22 @@ POM_DEVELOPER_NAME=facebook GRADLE_VERSIONS_PLUGIN_VERSION=0.15.0 -KOTLIN_VERSION=1.9.10 -DOKKA_VERSION=1.9.10 +KOTLIN_VERSION=1.9.22 +DOKKA_VERSION=1.9.20 DATA_CLASS_GENERATE_VERSION=1.0.1 # Deps for publishing -MAVEN_PUBLISH_PLUGIN=0.15.1 +MAVEN_PUBLISH_PLUGIN=0.28.0 # Gradle internals org.gradle.internal.repository.max.retries=10 org.gradle.internal.repository.initial.backoff=1250 -org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m +org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED # AndroidX android.useAndroidX = true android.enableJetifier = true android.jetifier.ignorelist=bcprov-jdk15on +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 67a7f3df5f6..64320b1666d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -14,6 +14,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/lib/yoga/build.gradle b/lib/yoga/build.gradle index 9bb6d38524c..5bec1efa704 100644 --- a/lib/yoga/build.gradle +++ b/lib/yoga/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion + namespace 'com.facebook.yoga' ndkVersion '26.1.10909125' diff --git a/lib/yogajni/build.gradle b/lib/yogajni/build.gradle index 2a00a9a4de4..dc6b54c8ac8 100644 --- a/lib/yogajni/build.gradle +++ b/lib/yogajni/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion + namespace 'com.facebook.yogajni' ndkVersion '26.1.10909125' diff --git a/litho-core/build.gradle b/litho-core/build.gradle index c5d62738a72..6f0695e39ba 100644 --- a/litho-core/build.gradle +++ b/litho-core/build.gradle @@ -44,11 +44,12 @@ android { buildConfigField 'boolean', useIncrementalMountHelper, 'true' } } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.litho' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-core/src/main/AndroidManifest.xml b/litho-core/src/main/AndroidManifest.xml index a4519b11f22..8acd2b77f0d 100644 --- a/litho-core/src/main/AndroidManifest.xml +++ b/litho-core/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-coroutines-kotlin/build.gradle b/litho-coroutines-kotlin/build.gradle index 409558b39b7..a5e2fa8d99f 100644 --- a/litho-coroutines-kotlin/build.gradle +++ b/litho-coroutines-kotlin/build.gradle @@ -53,6 +53,7 @@ android { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' } + namespace 'com.facebook.litho.coroutines' } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { diff --git a/litho-coroutines-kotlin/src/main/AndroidManifest.xml b/litho-coroutines-kotlin/src/main/AndroidManifest.xml index ec6cbf425c1..f4cb6472ccf 100644 --- a/litho-coroutines-kotlin/src/main/AndroidManifest.xml +++ b/litho-coroutines-kotlin/src/main/AndroidManifest.xml @@ -20,6 +20,4 @@ --> + xmlns:android="http://schemas.android.com/apk/res/android" /> diff --git a/litho-editor-core/build.gradle b/litho-editor-core/build.gradle index 67706a25402..073778d7114 100644 --- a/litho-editor-core/build.gradle +++ b/litho-editor-core/build.gradle @@ -28,9 +28,6 @@ android { } // TODO(#62): Re-enable abort on error. - lintOptions { - abortOnError false - } dependencies { api project(':litho-core') @@ -38,6 +35,10 @@ android { compileOnly deps.proguardAnnotations compileOnly deps.supportAnnotations } + namespace 'com.facebook.litho.editor' + lint { + abortOnError false + } } apply plugin: "com.vanniktech.maven.publish" diff --git a/litho-editor-core/src/main/AndroidManifest.xml b/litho-editor-core/src/main/AndroidManifest.xml index a42c806e241..670daec8372 100644 --- a/litho-editor-core/src/main/AndroidManifest.xml +++ b/litho-editor-core/src/main/AndroidManifest.xml @@ -16,6 +16,5 @@ ~ limitations under the License. --> - + diff --git a/litho-editor-flipper/build.gradle b/litho-editor-flipper/build.gradle index b8f031a57c4..f75439f87fa 100644 --- a/litho-editor-flipper/build.gradle +++ b/litho-editor-flipper/build.gradle @@ -29,9 +29,6 @@ android { } // TODO(#62): Re-enable abort on error. - lintOptions { - abortOnError false - } dependencies { kapt project(':litho-processor') @@ -63,6 +60,14 @@ android { kaptTest project(':litho-processor') } + namespace 'com.facebook.litho.editor.flipper' + lint { + abortOnError false + } +} + +kotlin { + jvmToolchain(17) } apply plugin: "com.vanniktech.maven.publish" diff --git a/litho-editor-flipper/src/main/AndroidManifest.xml b/litho-editor-flipper/src/main/AndroidManifest.xml index e5136e804e7..b746f15bc10 100644 --- a/litho-editor-flipper/src/main/AndroidManifest.xml +++ b/litho-editor-flipper/src/main/AndroidManifest.xml @@ -16,9 +16,7 @@ --> + xmlns:android="http://schemas.android.com/apk/res/android"> - + diff --git a/litho-flexlayout/build.gradle b/litho-flexlayout/build.gradle index 6830b0166b1..1450644f1d3 100644 --- a/litho-flexlayout/build.gradle +++ b/litho-flexlayout/build.gradle @@ -49,6 +49,7 @@ android { version '3.18.1' } } + namespace 'com.facebook.flexlayout' } dependencies { diff --git a/litho-flexlayout/src/main/AndroidManifest.xml b/litho-flexlayout/src/main/AndroidManifest.xml index 8a3d9ee4a6d..8acd2b77f0d 100644 --- a/litho-flexlayout/src/main/AndroidManifest.xml +++ b/litho-flexlayout/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-fresco-kotlin/build.gradle b/litho-fresco-kotlin/build.gradle index 1c4e11d17ba..40c51a3537e 100644 --- a/litho-fresco-kotlin/build.gradle +++ b/litho-fresco-kotlin/build.gradle @@ -30,6 +30,7 @@ android { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' } + namespace 'com.facebook.litho.fresco.kotlin' } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { diff --git a/litho-fresco-kotlin/src/main/AndroidManifest.xml b/litho-fresco-kotlin/src/main/AndroidManifest.xml index 1aa9f411ba0..8acd2b77f0d 100644 --- a/litho-fresco-kotlin/src/main/AndroidManifest.xml +++ b/litho-fresco-kotlin/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-fresco/build.gradle b/litho-fresco/build.gradle index 1d2cbfdab71..a504735b07a 100644 --- a/litho-fresco/build.gradle +++ b/litho-fresco/build.gradle @@ -23,11 +23,12 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.litho.fresco' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-fresco/src/main/AndroidManifest.xml b/litho-fresco/src/main/AndroidManifest.xml index 129bac817b3..8acd2b77f0d 100644 --- a/litho-fresco/src/main/AndroidManifest.xml +++ b/litho-fresco/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-instrumentation-tests/build.gradle b/litho-instrumentation-tests/build.gradle index 21ab3ca5ddb..fc0a3e4a744 100644 --- a/litho-instrumentation-tests/build.gradle +++ b/litho-instrumentation-tests/build.gradle @@ -36,9 +36,10 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility rootProject.sourceCompatibilityVersion + targetCompatibility rootProject.targetCompatibilityVersion } + namespace 'com.facebook.litho.instrumentationtests' } dependencies { diff --git a/litho-instrumentation-tests/src/main/AndroidManifest.xml b/litho-instrumentation-tests/src/main/AndroidManifest.xml index d76909511ef..dd434edd964 100644 --- a/litho-instrumentation-tests/src/main/AndroidManifest.xml +++ b/litho-instrumentation-tests/src/main/AndroidManifest.xml @@ -18,7 +18,6 @@ - + diff --git a/litho-it/build.gradle b/litho-it/build.gradle index 5e13b9f43cd..57e6412ae44 100644 --- a/litho-it/build.gradle +++ b/litho-it/build.gradle @@ -23,7 +23,6 @@ android { buildToolsVersion rootProject.buildToolsVersion kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 freeCompilerArgs = ['-Xjvm-default=all'] } @@ -70,16 +69,17 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility rootProject.sourceCompatibilityVersion + targetCompatibility rootProject.targetCompatibilityVersion } - lintOptions { - abortOnError false - } sourceSets.test.java.srcDir project(':litho-processor').file("src/test/java") sourceSets.test.java.srcDir project(':litho-sections-processor').file("src/test/java") + namespace 'com.facebook.litho.it' + lint { + abortOnError false + } } dependencies { diff --git a/litho-it/processor/build.gradle b/litho-it/processor/build.gradle index d841be98739..193d78d240d 100644 --- a/litho-it/processor/build.gradle +++ b/litho-it/processor/build.gradle @@ -17,8 +17,8 @@ apply plugin: 'java' apply plugin: 'maven-publish' -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 +sourceCompatibility = rootProject.sourceCompatibilityVersion +targetCompatibility = rootProject.targetCompatibilityVersion dependencies { implementation project(':litho-annotations') diff --git a/litho-it/specs/build.gradle b/litho-it/specs/build.gradle index 4d616b24032..92679f4a399 100644 --- a/litho-it/specs/build.gradle +++ b/litho-it/specs/build.gradle @@ -19,6 +19,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion + namespace 'com.facebook.litho.it.specs' defaultConfig { minSdkVersion rootProject.minSdkVersion diff --git a/litho-it/specs/src/main/AndroidManifest.xml b/litho-it/specs/src/main/AndroidManifest.xml index 4c3869444b0..8eb71e0a24d 100644 --- a/litho-it/specs/src/main/AndroidManifest.xml +++ b/litho-it/specs/src/main/AndroidManifest.xml @@ -17,7 +17,6 @@ diff --git a/litho-it/src/main/AndroidManifest.xml b/litho-it/src/main/AndroidManifest.xml index 4c3ce012620..aa3f3378e90 100644 --- a/litho-it/src/main/AndroidManifest.xml +++ b/litho-it/src/main/AndroidManifest.xml @@ -16,9 +16,7 @@ --> + xmlns:android="http://schemas.android.com/apk/res/android"> + xmlns:android="http://schemas.android.com/apk/res/android" /> diff --git a/litho-perf-logger/build.gradle b/litho-perf-logger/build.gradle index 6c91a3304c7..40b61b6c610 100644 --- a/litho-perf-logger/build.gradle +++ b/litho-perf-logger/build.gradle @@ -29,6 +29,7 @@ android { sourceSets { main.java.srcDirs += 'src/main/kotlin' } + namespace 'com.facebook.litho.performance' } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { diff --git a/litho-perf-logger/src/main/AndroidManifest.xml b/litho-perf-logger/src/main/AndroidManifest.xml index f2ec0a1377a..f4cb6472ccf 100644 --- a/litho-perf-logger/src/main/AndroidManifest.xml +++ b/litho-perf-logger/src/main/AndroidManifest.xml @@ -20,6 +20,4 @@ --> + xmlns:android="http://schemas.android.com/apk/res/android" /> diff --git a/litho-processor/build.gradle b/litho-processor/build.gradle index a8f859988a5..525e6fb6eae 100644 --- a/litho-processor/build.gradle +++ b/litho-processor/build.gradle @@ -18,8 +18,8 @@ import org.gradle.internal.jvm.Jvm apply plugin: 'java' -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 +sourceCompatibility = rootProject.sourceCompatibilityVersion +targetCompatibility = rootProject.targetCompatibilityVersion dependencies { // We *generate* code based on these annotations, so we cannot just depend on them @@ -37,8 +37,8 @@ dependencies { testImplementation deps.junit testImplementation deps.assertjCore compileJava { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + sourceCompatibility = rootProject.sourceCompatibilityVersion + targetCompatibility = rootProject.targetCompatibilityVersion } } diff --git a/litho-processor/src/main/AndroidManifest.xml b/litho-processor/src/main/AndroidManifest.xml index e183fa7750d..05b6031fc7c 100644 --- a/litho-processor/src/main/AndroidManifest.xml +++ b/litho-processor/src/main/AndroidManifest.xml @@ -16,7 +16,6 @@ --> diff --git a/litho-rendercore-center/build.gradle b/litho-rendercore-center/build.gradle index 7d28fedcb23..4646d9733af 100644 --- a/litho-rendercore-center/build.gradle +++ b/litho-rendercore-center/build.gradle @@ -33,11 +33,12 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-center/src/main/AndroidManifest.xml b/litho-rendercore-center/src/main/AndroidManifest.xml index e50307b51d7..8acd2b77f0d 100644 --- a/litho-rendercore-center/src/main/AndroidManifest.xml +++ b/litho-rendercore-center/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-default-node/build.gradle b/litho-rendercore-default-node/build.gradle index 915f99ff1ed..abc9055592c 100644 --- a/litho-rendercore-default-node/build.gradle +++ b/litho-rendercore-default-node/build.gradle @@ -43,11 +43,12 @@ android { release { } } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-default-node/src/main/AndroidManifest.xml b/litho-rendercore-default-node/src/main/AndroidManifest.xml index 9452457b62d..124e943500d 100644 --- a/litho-rendercore-default-node/src/main/AndroidManifest.xml +++ b/litho-rendercore-default-node/src/main/AndroidManifest.xml @@ -15,8 +15,7 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-default-text-node/build.gradle b/litho-rendercore-default-text-node/build.gradle index 9e1818d8068..4fb115eda8d 100644 --- a/litho-rendercore-default-text-node/build.gradle +++ b/litho-rendercore-default-text-node/build.gradle @@ -43,11 +43,12 @@ android { release { } } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-default-text-node/src/main/AndroidManifest.xml b/litho-rendercore-default-text-node/src/main/AndroidManifest.xml index 9452457b62d..124e943500d 100644 --- a/litho-rendercore-default-text-node/src/main/AndroidManifest.xml +++ b/litho-rendercore-default-text-node/src/main/AndroidManifest.xml @@ -15,8 +15,7 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-extensions/build.gradle b/litho-rendercore-extensions/build.gradle index 0ad34e10e8a..5eec4a9f03c 100644 --- a/litho-rendercore-extensions/build.gradle +++ b/litho-rendercore-extensions/build.gradle @@ -39,11 +39,12 @@ android { release { } } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore.extensions' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-extensions/src/main/AndroidManifest.xml b/litho-rendercore-extensions/src/main/AndroidManifest.xml index 3f72bc2adcb..0720576fd4e 100644 --- a/litho-rendercore-extensions/src/main/AndroidManifest.xml +++ b/litho-rendercore-extensions/src/main/AndroidManifest.xml @@ -19,6 +19,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-glide/build.gradle b/litho-rendercore-glide/build.gradle index b865977f041..a1c857aa202 100644 --- a/litho-rendercore-glide/build.gradle +++ b/litho-rendercore-glide/build.gradle @@ -33,11 +33,12 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-glide/src/main/AndroidManifest.xml b/litho-rendercore-glide/src/main/AndroidManifest.xml index e50307b51d7..8acd2b77f0d 100644 --- a/litho-rendercore-glide/src/main/AndroidManifest.xml +++ b/litho-rendercore-glide/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-incremental-mount/build.gradle b/litho-rendercore-incremental-mount/build.gradle index c91a9875440..c0bd318fe09 100644 --- a/litho-rendercore-incremental-mount/build.gradle +++ b/litho-rendercore-incremental-mount/build.gradle @@ -27,6 +27,7 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } + namespace 'com.facebook.rendercore.incrementalmount' } dependencies { diff --git a/litho-rendercore-incremental-mount/src/main/AndroidManifest.xml b/litho-rendercore-incremental-mount/src/main/AndroidManifest.xml index 5bbc2d97f4a..4a85c7f29bf 100644 --- a/litho-rendercore-incremental-mount/src/main/AndroidManifest.xml +++ b/litho-rendercore-incremental-mount/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-primitive-components/canvas/build.gradle b/litho-rendercore-primitive-components/canvas/build.gradle index 997db7fff53..c511f677cc1 100644 --- a/litho-rendercore-primitive-components/canvas/build.gradle +++ b/litho-rendercore-primitive-components/canvas/build.gradle @@ -24,6 +24,7 @@ version = VERSION_NAME android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion + namespace 'com.facebook.primitive.canvas' // We're on an old version of Robolectric which requires this, sadly. useLibrary 'org.apache.http.legacy' diff --git a/litho-rendercore-primitive-components/canvas/src/main/AndroidManifest.xml b/litho-rendercore-primitive-components/canvas/src/main/AndroidManifest.xml index 5384eb0518a..8acd2b77f0d 100644 --- a/litho-rendercore-primitive-components/canvas/src/main/AndroidManifest.xml +++ b/litho-rendercore-primitive-components/canvas/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-primitive-components/utils/build.gradle b/litho-rendercore-primitive-components/utils/build.gradle index d199c136498..d175fe24a8f 100644 --- a/litho-rendercore-primitive-components/utils/build.gradle +++ b/litho-rendercore-primitive-components/utils/build.gradle @@ -24,6 +24,7 @@ version = VERSION_NAME android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion + namespace 'com.facebook.primitive.utils' // We're on an old version of Robolectric which requires this, sadly. useLibrary 'org.apache.http.legacy' diff --git a/litho-rendercore-primitive-components/utils/src/main/AndroidManifest.xml b/litho-rendercore-primitive-components/utils/src/main/AndroidManifest.xml index a7f7093a7c9..8acd2b77f0d 100644 --- a/litho-rendercore-primitive-components/utils/src/main/AndroidManifest.xml +++ b/litho-rendercore-primitive-components/utils/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-primitives/build.gradle b/litho-rendercore-primitives/build.gradle index 462fc7e0815..99848df0e0e 100644 --- a/litho-rendercore-primitives/build.gradle +++ b/litho-rendercore-primitives/build.gradle @@ -40,11 +40,12 @@ android { release { } } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore.primitives' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-primitives/src/main/AndroidManifest.xml b/litho-rendercore-primitives/src/main/AndroidManifest.xml index 605c2dca086..4a85c7f29bf 100644 --- a/litho-rendercore-primitives/src/main/AndroidManifest.xml +++ b/litho-rendercore-primitives/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-res/build.gradle b/litho-rendercore-res/build.gradle index a9270025fd6..7165e3df4e5 100644 --- a/litho-rendercore-res/build.gradle +++ b/litho-rendercore-res/build.gradle @@ -29,11 +29,12 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-res/src/main/AndroidManifest.xml b/litho-rendercore-res/src/main/AndroidManifest.xml index edd43ad25ed..56ab13fb1c3 100644 --- a/litho-rendercore-res/src/main/AndroidManifest.xml +++ b/litho-rendercore-res/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ - + - + diff --git a/litho-rendercore-text/build.gradle b/litho-rendercore-text/build.gradle index b2ef6e80b1f..1b5d47f3050 100644 --- a/litho-rendercore-text/build.gradle +++ b/litho-rendercore-text/build.gradle @@ -26,11 +26,12 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore.text' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-text/src/main/AndroidManifest.xml b/litho-rendercore-text/src/main/AndroidManifest.xml index f3dd0d3c06a..8acd2b77f0d 100644 --- a/litho-rendercore-text/src/main/AndroidManifest.xml +++ b/litho-rendercore-text/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-transitions/build.gradle b/litho-rendercore-transitions/build.gradle index 87956b7aa27..1e8e96b64c2 100644 --- a/litho-rendercore-transitions/build.gradle +++ b/litho-rendercore-transitions/build.gradle @@ -26,10 +26,11 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - lintOptions { + namespace 'com.facebook.rendercore.transitions' + lint { abortOnError true } + } dependencies { diff --git a/litho-rendercore-transitions/src/main/AndroidManifest.xml b/litho-rendercore-transitions/src/main/AndroidManifest.xml index ebcd4f032e4..8acd2b77f0d 100644 --- a/litho-rendercore-transitions/src/main/AndroidManifest.xml +++ b/litho-rendercore-transitions/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-visibility/build.gradle b/litho-rendercore-visibility/build.gradle index 75b7c3d11b3..f2f333bf003 100644 --- a/litho-rendercore-visibility/build.gradle +++ b/litho-rendercore-visibility/build.gradle @@ -38,11 +38,12 @@ android { release { } } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore.visibility' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-visibility/src/main/AndroidManifest.xml b/litho-rendercore-visibility/src/main/AndroidManifest.xml index 488e211926c..8acd2b77f0d 100644 --- a/litho-rendercore-visibility/src/main/AndroidManifest.xml +++ b/litho-rendercore-visibility/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore-yoga/build.gradle b/litho-rendercore-yoga/build.gradle index f3e66a597d2..a738c2ccaf8 100644 --- a/litho-rendercore-yoga/build.gradle +++ b/litho-rendercore-yoga/build.gradle @@ -29,11 +29,12 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore-yoga/src/main/AndroidManifest.xml b/litho-rendercore-yoga/src/main/AndroidManifest.xml index 9452457b62d..124e943500d 100644 --- a/litho-rendercore-yoga/src/main/AndroidManifest.xml +++ b/litho-rendercore-yoga/src/main/AndroidManifest.xml @@ -15,8 +15,7 @@ ~ limitations under the License. --> - + diff --git a/litho-rendercore/build.gradle b/litho-rendercore/build.gradle index 974758a4eff..c41afa8fe86 100644 --- a/litho-rendercore/build.gradle +++ b/litho-rendercore/build.gradle @@ -46,11 +46,12 @@ android { maxParallelForks = 4 } } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.rendercore' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-rendercore/src/main/AndroidManifest.xml b/litho-rendercore/src/main/AndroidManifest.xml index 9452457b62d..124e943500d 100644 --- a/litho-rendercore/src/main/AndroidManifest.xml +++ b/litho-rendercore/src/main/AndroidManifest.xml @@ -15,8 +15,7 @@ ~ limitations under the License. --> - + diff --git a/litho-sections-core/build.gradle b/litho-sections-core/build.gradle index f0fe90b13e2..48de404ff9c 100644 --- a/litho-sections-core/build.gradle +++ b/litho-sections-core/build.gradle @@ -27,6 +27,7 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } + namespace 'com.facebook.litho.sections' } dependencies { diff --git a/litho-sections-core/src/main/AndroidManifest.xml b/litho-sections-core/src/main/AndroidManifest.xml index e9efdeb4a8a..8acd2b77f0d 100644 --- a/litho-sections-core/src/main/AndroidManifest.xml +++ b/litho-sections-core/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-sections-debug/build.gradle b/litho-sections-debug/build.gradle index bba8f52ac65..ecd1b2fd828 100644 --- a/litho-sections-debug/build.gradle +++ b/litho-sections-debug/build.gradle @@ -26,6 +26,7 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } + namespace 'com.facebook.litho.sections.debug' } dependencies { diff --git a/litho-sections-debug/src/main/AndroidManifest.xml b/litho-sections-debug/src/main/AndroidManifest.xml index a85ae28e72a..8acd2b77f0d 100644 --- a/litho-sections-debug/src/main/AndroidManifest.xml +++ b/litho-sections-debug/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-sections-processor/build.gradle b/litho-sections-processor/build.gradle index c4f6dd4bc2c..c6acebc23f8 100644 --- a/litho-sections-processor/build.gradle +++ b/litho-sections-processor/build.gradle @@ -16,8 +16,8 @@ apply plugin: 'java' -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 +sourceCompatibility = rootProject.sourceCompatibilityVersion +targetCompatibility = rootProject.targetCompatibilityVersion dependencies { implementation project(':litho-annotations') diff --git a/litho-sections-widget/build.gradle b/litho-sections-widget/build.gradle index 9eb7aea24df..ea4daf44902 100644 --- a/litho-sections-widget/build.gradle +++ b/litho-sections-widget/build.gradle @@ -26,6 +26,7 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } + namespace 'com.facebook.litho.sections.widget' } dependencies { diff --git a/litho-sections-widget/src/main/AndroidManifest.xml b/litho-sections-widget/src/main/AndroidManifest.xml index 0822bdf081b..8acd2b77f0d 100644 --- a/litho-sections-widget/src/main/AndroidManifest.xml +++ b/litho-sections-widget/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-testing/build.gradle b/litho-testing/build.gradle index 749fb1b93f4..745c1fb066b 100644 --- a/litho-testing/build.gradle +++ b/litho-testing/build.gradle @@ -27,9 +27,6 @@ android { minSdkVersion rootProject.minSdkVersion } - lintOptions { - disable "InvalidPackage", "NewApi" - } testOptions { unitTests.all { @@ -39,6 +36,10 @@ android { unitTests.includeAndroidResources = true } + namespace 'com.facebook.litho.testing' + lint { + disable 'InvalidPackage', 'NewApi' + } } dependencies { diff --git a/litho-testing/src/main/AndroidManifest.xml b/litho-testing/src/main/AndroidManifest.xml index 0c153bc533c..8acd2b77f0d 100644 --- a/litho-testing/src/main/AndroidManifest.xml +++ b/litho-testing/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-widget-kotlin/build.gradle b/litho-widget-kotlin/build.gradle index 9ca8d83d92f..9613fd2b648 100644 --- a/litho-widget-kotlin/build.gradle +++ b/litho-widget-kotlin/build.gradle @@ -34,6 +34,7 @@ android { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' } + namespace 'com.facebook.litho.widget.kotlin' } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { diff --git a/litho-widget-kotlin/src/main/AndroidManifest.xml b/litho-widget-kotlin/src/main/AndroidManifest.xml index aa0255a69dc..8acd2b77f0d 100644 --- a/litho-widget-kotlin/src/main/AndroidManifest.xml +++ b/litho-widget-kotlin/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-widget-material/build.gradle b/litho-widget-material/build.gradle index eb2f917b3f6..3f2872ef8fe 100644 --- a/litho-widget-material/build.gradle +++ b/litho-widget-material/build.gradle @@ -27,6 +27,7 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } + namespace 'com.facebook.litho.widget' } dependencies { diff --git a/litho-widget-material/src/main/AndroidManifest.xml b/litho-widget-material/src/main/AndroidManifest.xml index e02a16fad7e..8acd2b77f0d 100644 --- a/litho-widget-material/src/main/AndroidManifest.xml +++ b/litho-widget-material/src/main/AndroidManifest.xml @@ -15,6 +15,5 @@ ~ limitations under the License. --> - + diff --git a/litho-widget/build.gradle b/litho-widget/build.gradle index dc994007ad3..d105e71d810 100644 --- a/litho-widget/build.gradle +++ b/litho-widget/build.gradle @@ -32,11 +32,12 @@ android { defaultConfig { minSdkVersion rootProject.minSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.litho.widget' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/litho-widget/src/main/AndroidManifest.xml b/litho-widget/src/main/AndroidManifest.xml index bc907ab95ed..1f34ee4cdae 100644 --- a/litho-widget/src/main/AndroidManifest.xml +++ b/litho-widget/src/main/AndroidManifest.xml @@ -15,7 +15,6 @@ ~ limitations under the License. --> - + diff --git a/sample-barebones/build.gradle b/sample-barebones/build.gradle index 200ba2c6205..966a6a6665c 100644 --- a/sample-barebones/build.gradle +++ b/sample-barebones/build.gradle @@ -29,11 +29,12 @@ android { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.samples.lithoktbarebones' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } kapt { diff --git a/sample-barebones/src/main/AndroidManifest.xml b/sample-barebones/src/main/AndroidManifest.xml index ca3026a7fd3..f4ea08ee22b 100644 --- a/sample-barebones/src/main/AndroidManifest.xml +++ b/sample-barebones/src/main/AndroidManifest.xml @@ -17,9 +17,7 @@ + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> diff --git a/sample/build.gradle b/sample/build.gradle index f62d4dc66ab..3fa1ebf30d1 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -22,8 +22,8 @@ android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion - targetCompatibility = targetCompatibilityVersion - sourceCompatibility = sourceCompatibilityVersion + targetCompatibility = rootProject.targetCompatibilityVersion + sourceCompatibility = rootProject.sourceCompatibilityVersion defaultConfig { minSdkVersion rootProject.minSdkVersion @@ -32,11 +32,12 @@ android { multiDexEnabled true testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } - - // TODO(#62): Re-enable abort on error. - lintOptions { + namespace 'com.facebook.samples.litho' + lint { abortOnError false } + + // TODO(#62): Re-enable abort on error. } dependencies { diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 28d6ce8e65e..b03abf23e82 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -15,8 +15,7 @@ --> + xmlns:tools="http://schemas.android.com/tools">