Created
February 14, 2017 09:40
-
-
Save AndrewJack/10dc22708582b009fb74f07904f3bfb1 to your computer and use it in GitHub Desktop.
React Native Android Library SDK Versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subprojects { | |
ext { | |
compileSdk = 25 | |
buildTools = "25.0.1" | |
minSdk = 19 | |
targetSdk = 25 | |
} | |
afterEvaluate { project -> | |
if (!project.name.equalsIgnoreCase("app") | |
&& project.hasProperty("android")) { | |
android { | |
compileSdkVersion compileSdk | |
buildToolsVersion buildTools | |
defaultConfig { | |
minSdkVersion minSdk | |
targetSdkVersion targetSdk | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@AndrewJack I have a question about a variation of this.
When creating a React Native module, it seems that it's recommended to list RN as a dependency like this:
(for an example see react-native-image-picker)
However, if your app is building RN from source, this should be changed to:
If you don't do this, the module will be compiled against the wrong version of React Native.
For each of the app's dependencies, is there a way to transform the dependency
compile "com.facebook.react:react-native:+"
intocompile project(':ReactAndroid')
using gradle'ssubprojects
feature?