Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from BohdanRybakEk/master
Browse files Browse the repository at this point in the history
Add ability to working with gradle plugin version 7+
  • Loading branch information
vasylnahuliak authored Jul 7, 2022
2 parents 8891e3e + 2bb8d1e commit a6859d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 48 deletions.
49 changes: 2 additions & 47 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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 @@ -37,7 +37,7 @@ buildscript {
dependencies {
// This should reflect the Gradle plugin version used by
// the minimum React Native version supported.
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.4.3'
}
}
}
Expand Down Expand Up @@ -122,48 +122,3 @@ def configureReactNativePom(def pom) {
}
}
}

afterEvaluate { project ->
// some Gradle build hooks ref:
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
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'
}

android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
def javaCompileTask = variant.javaCompileProvider.get()

task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
from javaCompileTask.destinationDir
}
}

artifacts {
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
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ekreative/react-native-braintree",
"title": "React Native Braintree",
"version": "1.0.3",
"version": "1.0.4",
"description": "TODO",
"main": "index.js",
"files": [
Expand Down

0 comments on commit a6859d3

Please sign in to comment.