diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index d03355334b4..81f0e0e1cbb 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -5,17 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -buildscript { - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.hasProperty("kotlinVersion") ? rootProject.ext.kotlinVersion : KOTLIN_VERSION}" - } -} - plugins { id("com.android.library") id("com.facebook.react") id("de.undercouch.download") id("maven-publish") + id("org.jetbrains.kotlin.android") } import com.facebook.react.tasks.internal.* diff --git a/ReactAndroid/gradle.properties b/ReactAndroid/gradle.properties index 951f8874bc5..1801c32f949 100644 --- a/ReactAndroid/gradle.properties +++ b/ReactAndroid/gradle.properties @@ -30,8 +30,5 @@ FOLLY_VERSION=2021.07.22.00 GLOG_VERSION=0.3.5 LIBEVENT_VERSION=2.1.12 -# Plugins Versions -KOTLIN_VERSION=1.6.10 - android.useAndroidX=true android.enableJetifier=true diff --git a/build.gradle.kts b/build.gradle.kts index dde63fc0073..9c6fad7ae4f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,13 @@ * LICENSE file in the root directory of this source tree. */ -plugins { id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } +plugins { + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" + id("com.android.library") version "7.4.1" apply false + id("com.android.application") version "7.4.1" apply false + id("de.undercouch.download") version "5.0.1" apply false + kotlin("android") version "1.6.10" apply false +} val reactAndroidProperties = java.util.Properties() @@ -25,19 +31,6 @@ group = "com.facebook.react" val ndkPath by extra(System.getenv("ANDROID_NDK")) val ndkVersion by extra(System.getenv("ANDROID_NDK_VERSION")) - -buildscript { - repositories { - google() - mavenCentral() - gradlePluginPortal() - } - dependencies { - classpath("com.android.tools.build:gradle:7.4.1") - classpath("de.undercouch:gradle-download-task:5.0.1") - } -} - val sonatypeUsername = findProperty("SONATYPE_USERNAME")?.toString() val sonatypePassword = findProperty("SONATYPE_PASSWORD")?.toString() @@ -52,14 +45,8 @@ nexusPublishing { allprojects { repositories { - maven { url = uri("$rootDir/node_modules/jsc-android/dist") } - maven { url = uri("$rootDir/android") } google() - mavenCentral { - // We don't want to fetch react-native from Maven Central as there are - // older versions over there. - content { excludeGroup("com.facebook.react") } - } + mavenCentral() } }