frostney / react-native-create-library

:notebook: Command line tool to create a React Native library with a single command
MIT License
1.45k stars 113 forks source link

Better setup for android build version. #67

Closed hyochan closed 6 years ago

hyochan commented 6 years ago

React Native now has its project set up with default build version of androids sdk. Set android build version to that of rootProject’s to prevent from build failing cause of version mismatch.

maicki commented 6 years ago

@thorbenprimke Could you please take a look at this PR? Thanks!

hyochan commented 6 years ago

@maicki @thorbenprimke I just got notified and I updated code safer.

maicki commented 6 years ago

@dooboolab Hey - I would like to go forward with this, just some small improvements before landing. Can you extract setting the version via a function like:

def safeExtGet(prop, fallback) {
     rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
 }

and set each value like:

// ...
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
// ...
hyochan commented 6 years ago

@maicki Someone already gave PR on this one. Thanks for the merge.