diff --git a/android/build.gradle b/android/build.gradle index f23cf50..c6d096c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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. @@ -101,48 +101,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 - } - } -} diff --git a/package.json b/package.json index e2eb48b..ed867a9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "title": "React Native Cs Token Grabber", "version": "1.0.0", "description": "TODO", - "main": "index.js", + "main": "src/index.js", "files": [ "README.md", "android", diff --git a/index.js b/src/index.js similarity index 66% rename from index.js rename to src/index.js index 1fb3768..ff0453c 100644 --- a/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ // main index.js -import { NativeModules } from 'react-native'; +import { NativeModules } from "react-native"; const { CsTokenGrabber } = NativeModules;