Skip to content

Commit

Permalink
fix(gradle): add gradle 7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ghashi committed Nov 5, 2022
1 parent 6bc9e47 commit 46ed146
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def safeExtGet(prop, fallback) {
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'

buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
Expand All @@ -39,7 +39,7 @@ buildscript {
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'

android {
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
Expand Down Expand Up @@ -109,9 +109,10 @@ afterEvaluate { project ->
// some Gradle build hooks ref:
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
task androidJavadoc(type: Javadoc) {
project.configurations.getByName("implementation").setCanBeResolved(true)
source = android.sourceSets.main.java.srcDirs
classpath += files(android.bootClasspath)
classpath += files(project.getConfigurations().getByName('compile').asList())
classpath += files(project.getConfigurations().getByName('implementation').asList())
include '**/*.java'
}

Expand Down Expand Up @@ -140,12 +141,12 @@ afterEvaluate { project ->
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
}
}
// 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
// }
// }
}

0 comments on commit 46ed146

Please sign in to comment.