You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds Support For Generating Maven Package For Android Library (#58)
* Adds Support For Generating Maven Package For Android Library
Summary:
This adds support for generating the maven package similar to how
React Native core does it.
This allows a brownfield Android project reference this maven package
instead of the project in the node_modules.
* Adds config options for author's github, name and email.
Updates README
* added default values to readme
* fixed merge conflict
* Makes the library license type command line configurable
* Changes authorGithub to githubAccount
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,10 @@ Options:
47
47
--namespace <namespace> (Windows only!) The namespace for the Windows module
48
48
(Default: The name as PascalCase)
49
49
--platforms <platforms> Platforms the library will be created for. (comma separated; default: `ios,android,windows`)
50
+
--github-account <github_account> The github account where the library is hosted (Default: `github_account`)
51
+
--author-name <name> The author's name (Default: `Your Name`)
52
+
--author-email <email> The author's email (Default: `yourname@email.com`)
53
+
--license <license> The license type of this library (Default: `Apache-2.0`)
50
54
```
51
55
52
56
## Programmatic usage
@@ -69,6 +73,10 @@ createLibrary({
69
73
platforms:Array, /* Platforms the library will be created for. (Default: ['ios', 'android', 'windows']) */
70
74
packageIdentifier:String, /* (Android only!) The package name for the Android module (Default: com.reactlibrary) */
71
75
namespace:String, /* (Windows only!) The namespace for the Windows module (Default: The package identifier as PascalCase, which is `Com.Reactlibrary`) */
76
+
githubAccount:String, /* The github account where the library is hosted (Default: `github_account`) */
77
+
authorName:String, /* The author's name (Default: `Your Name`) */
78
+
authorEmail:String, /* The author's email (Default: `yourname@email.com`) */
79
+
license:String, /* The license type of this library (Default: `Apache-2.0`) */
@@ -108,4 +180,21 @@ public class ${name}Package implements ReactPackage {
108
180
return Collections.emptyList();
109
181
}
110
182
}`,
111
-
}];
183
+
},{
184
+
name: ()=>`${platform}/README.md`,
185
+
content: ()=>`
186
+
README
187
+
======
188
+
189
+
If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm:
190
+
191
+
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
192
+
2. Be sure to have a \`local.properties\` file in this folder that points to the Android SDK and NDK
0 commit comments