Skip to content

Commit 1af4ae4

Browse files
authored
Remove unused maven plugin (fix build error on react-native 0.67) (#177)
* Remove unused maven plugin * Remove afterEvaluate since we no longer need its artifacts
1 parent cb083ea commit 1af4ae4

1 file changed

Lines changed: 0 additions & 75 deletions

File tree

android/build.gradle

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ def safeExtGet(prop, fallback) {
77
}
88

99
apply plugin: 'com.android.library'
10-
apply plugin: 'maven'
1110

1211
buildscript {
1312
// The Android Gradle plugin is only required when opening the android folder stand-alone.
@@ -27,7 +26,6 @@ buildscript {
2726
}
2827

2928
apply plugin: 'com.android.library'
30-
apply plugin: 'maven'
3129

3230
android {
3331
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
@@ -74,76 +72,3 @@ dependencies {
7472
//noinspection GradleDynamicVersion
7573
implementation "com.facebook.react:react-native:+" // From node_modules
7674
}
77-
78-
def configureReactNativePom(def pom) {
79-
def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
80-
81-
pom.project {
82-
name packageJson.title
83-
artifactId packageJson.name
84-
version = packageJson.version
85-
group = "com.reactlibrary"
86-
description packageJson.description
87-
url packageJson.repository.baseUrl
88-
89-
licenses {
90-
license {
91-
name packageJson.license
92-
url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
93-
distribution 'repo'
94-
}
95-
}
96-
97-
developers {
98-
developer {
99-
id packageJson.author.username
100-
name packageJson.author.name
101-
}
102-
}
103-
}
104-
}
105-
106-
afterEvaluate { project ->
107-
// some Gradle build hooks ref:
108-
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
109-
task androidJavadoc(type: Javadoc) {
110-
source = android.sourceSets.main.java.srcDirs
111-
classpath += files(android.bootClasspath)
112-
classpath += files(project.getConfigurations().getByName('compile').asList())
113-
include '**/*.java'
114-
}
115-
116-
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
117-
classifier = 'javadoc'
118-
from androidJavadoc.destinationDir
119-
}
120-
121-
task androidSourcesJar(type: Jar) {
122-
classifier = 'sources'
123-
from android.sourceSets.main.java.srcDirs
124-
include '**/*.java'
125-
}
126-
127-
android.libraryVariants.all { variant ->
128-
def name = variant.name.capitalize()
129-
def javaCompileTask = variant.javaCompileProvider.get()
130-
131-
task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
132-
from javaCompileTask.destinationDir
133-
}
134-
}
135-
136-
artifacts {
137-
archives androidSourcesJar
138-
archives androidJavadocJar
139-
}
140-
141-
task installArchives(type: Upload) {
142-
configuration = configurations.archives
143-
repositories.mavenDeployer {
144-
// Deploy to react-native-event-bridge/maven, ready to publish to npm
145-
repository url: "file://${projectDir}/../android/maven"
146-
configureReactNativePom pom
147-
}
148-
}
149-
}

0 commit comments

Comments
 (0)