diff --git a/android/README.md b/android/README.md
new file mode 100644
index 00000000..19ab5e11
--- /dev/null
+++ b/android/README.md
@@ -0,0 +1,15 @@
+README
+======
+
+Steps before publishing a new version to npm:
+
+1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed
+2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK
+```
+ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle
+sdk.dir=/Users/{username}/Library/Android/sdk
+```
+3. Delete the `maven` folder
+4. Run `sudo ./gradlew installArchives`
+5. Verify that latest set of generated files is in the maven folder with the correct version number
+
diff --git a/android/build.gradle b/android/build.gradle
index de375bf2..f248aac2 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,4 +1,16 @@
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.1.4'
+ }
+}
+
apply plugin: 'com.android.library'
+apply plugin: 'maven'
def DEFAULT_COMPILE_SDK_VERSION = 26
def DEFAULT_BUILD_TOOLS_VERSION = "26.0.2"
@@ -19,6 +31,86 @@ android {
}
}
+repositories {
+ google()
+ jcenter()
+ maven {
+ url "$projectDir/../node_modules/react-native/android"
+ }
+ mavenCentral()
+}
+
dependencies {
compileOnly 'com.facebook.react:react-native:+'
-}
\ No newline at end of file
+}
+
+def configureReactNativePom(def pom) {
+ def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
+
+ pom.project {
+ name "React Native Sound"
+ artifactId packageJson.name
+ version = packageJson.version
+ group = "com.zmxv.RNSound"
+ description packageJson.description
+ url packageJson.repository.baseUrl
+
+ licenses {
+ license {
+ name packageJson.license
+ url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename
+ distribution 'repo'
+ }
+ }
+
+ developers {
+ developer {
+ id 'zmxv'
+ name packageJson.author.name
+ }
+ }
+ }
+}
+
+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'
+ }
+
+ android.libraryVariants.all { variant ->
+ def name = variant.name.capitalize()
+ task "jar${name}"(type: Jar, dependsOn: variant.javaCompile) {
+ from variant.javaCompile.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/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar
new file mode 100644
index 00000000..7a430b14
Binary files /dev/null and b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar differ
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar.md5 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar.md5
new file mode 100644
index 00000000..530626b9
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar.md5
@@ -0,0 +1 @@
+60106aaefd1651dfce923a4471716e21
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar.sha1 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar.sha1
new file mode 100644
index 00000000..a4ac6487
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-javadoc.jar.sha1
@@ -0,0 +1 @@
+dd52b4d751cec99c67422ad6a7a4eba7d8d347e6
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar
new file mode 100644
index 00000000..9cf89874
Binary files /dev/null and b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar differ
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar.md5 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar.md5
new file mode 100644
index 00000000..9dfa08de
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar.md5
@@ -0,0 +1 @@
+1bcef3718951fc026eccd47926697f4d
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar.sha1 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar.sha1
new file mode 100644
index 00000000..b229b918
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12-sources.jar.sha1
@@ -0,0 +1 @@
+2855b2257d3f4a718bd4863ca57a7cd9562091aa
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar
new file mode 100644
index 00000000..90feba99
Binary files /dev/null and b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar differ
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar.md5 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar.md5
new file mode 100644
index 00000000..eab54a53
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar.md5
@@ -0,0 +1 @@
+203e4fc952c468155bb4b9e689270736
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar.sha1 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar.sha1
new file mode 100644
index 00000000..094f06a6
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.aar.sha1
@@ -0,0 +1 @@
+c48e14575bba63f2e3f271f0e56070745239a79d
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom
new file mode 100644
index 00000000..3ffeed0b
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+ com.zmxv.RNSound
+ react-native-sound
+ 0.10.12
+ aar
+ React Native Sound
+ React Native module for playing sound clips on iOS, Android, and Windows
+ null
+
+
+ MIT
+ null/blob/master/null
+ repo
+
+
+
+
+ zmxv
+ Zhen Wang (http://blog.zmxv.com)
+
+
+
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom.md5 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom.md5
new file mode 100644
index 00000000..f23c4c88
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom.md5
@@ -0,0 +1 @@
+cc939039245e899b4bc7457de3c3e6cf
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom.sha1 b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom.sha1
new file mode 100644
index 00000000..25a605ea
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/0.10.12/react-native-sound-0.10.12.pom.sha1
@@ -0,0 +1 @@
+53f0cb9cfd309dfd902d2f6690f2d4b805db62f3
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml b/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml
new file mode 100644
index 00000000..fab1aa48
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml
@@ -0,0 +1,12 @@
+
+
+ com.zmxv.RNSound
+ react-native-sound
+
+ 0.10.12
+
+ 0.10.12
+
+ 20190614175543
+
+
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml.md5 b/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml.md5
new file mode 100644
index 00000000..1dc30260
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml.md5
@@ -0,0 +1 @@
+79e5fc5cdd7143aaabc5561945558b4c
\ No newline at end of file
diff --git a/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml.sha1 b/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml.sha1
new file mode 100644
index 00000000..6af73672
--- /dev/null
+++ b/android/maven/com/zmxv/RNSound/react-native-sound/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+e17070c134bc996b14a099b3f807b581da900a90
\ No newline at end of file
diff --git a/package.json b/package.json
index 51afefbf..eefadf2f 100644
--- a/package.json
+++ b/package.json
@@ -14,9 +14,15 @@
"sound",
"audio"
],
- "author": "Zhen Wang (http://blog.zmxv.com)",
+ "author": {
+ "name": "Zhen Wang (http://blog.zmxv.com)",
+ "email": "z@zmxv.com"
+ },
"license": "MIT",
+ "devDependencies": {
+ "react-native": "0.59.9"
+ },
"peerDependencies": {
"react-native": ">=0.8.0"
}
-}
+}
\ No newline at end of file