diff --git a/react-native/react-native-flipper/android/build.gradle b/react-native/react-native-flipper/android/build.gradle index 517f07270..e544dbdf4 100644 --- a/react-native/react-native-flipper/android/build.gradle +++ b/react-native/react-native-flipper/android/build.gradle @@ -7,6 +7,25 @@ // android/build.gradle +buildscript { + // The Android Gradle plugin is only required when opening the android folder stand-alone. + // This avoids unnecessary downloads and potential conflicts when the library is included as a + // module dependency in an application project. + // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies + if (project == rootProject) { + repositories { + google() + } + dependencies { + classpath 'com.android.tools.build:gradle:4.2.1' + } + } +} + +plugins { + id 'maven-publish' +} + // based on: // // * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle @@ -27,26 +46,6 @@ def safeExtGet(prop, fallback) { } apply plugin: 'com.android.library' -apply plugin: 'maven' - -buildscript { - // The Android Gradle plugin is only required when opening the android folder stand-alone. - // This avoids unnecessary downloads and potential conflicts when the library is included as a - // module dependency in an application project. - // ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies - if (project == rootProject) { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' - } - } -} - -apply plugin: 'com.android.library' -apply plugin: 'maven' android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) @@ -74,7 +73,6 @@ repositories { url "$rootDir/../node_modules/jsc-android/dist" } google() - jcenter() } dependencies { @@ -120,17 +118,14 @@ afterEvaluate { project -> task androidJavadoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) include '**/*.java' } task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' from androidJavadoc.destinationDir } task androidSourcesJar(type: Jar) { - classifier = 'sources' from android.sourceSets.main.java.srcDirs include '**/*.java' } @@ -148,13 +143,4 @@ afterEvaluate { project -> archives androidSourcesJar archives androidJavadocJar } - - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: "file://${projectDir}/../android/maven" - configureReactNativePom pom - } - } }