jordanbyron / react-native-quick-actions

A react-native interface for Touch 3D home screen quick actions
MIT License
1.06k stars 93 forks source link

fix android build conflict #73

Closed SunnyEver0 closed 5 years ago

SunnyEver0 commented 5 years ago

72 thanks

jordanbyron commented 5 years ago

@SunnyEver0 you never answered my question from above:

Is there any documentation about libraries allowing their min and target sdk version from being overwritten by the container project? This seems brittle and potentially allows projects to build with this library despite it using a lower sdk version which is not supported.

SunnyEver0 commented 5 years ago

@jordanbyron Hi, jordanbyron, the documentation of this I have not found. And this change is to let the control of sdk be controlled by the project itself to avoid conflicts between the sdk compiled version and the plugin version of the project.Just like in react-native-vector-icons/android/build.gradle

jordanbyron commented 5 years ago

@SunnyEver0 thanks for linking to a project which uses this pattern. My concern about the current implementation dropping below our min supported SDK version still exists. Do you feel comfortable modifying your code so it will revert back to the min SDK version if the requested version is below our min? Something akin to this:

if rootProject.sdkVersion is present && rootProject.sdkVersion > ourMinSDK
  rootProject.sdkVersion
else
  ourMinSDK
end
jordanbyron commented 5 years ago

Closing due to inactivity. @SunnyEver0 you were on the right track here, but without the changes I requested I don't feel comfortable merging this in.

SunnyEver0 commented 5 years ago

@jordanbyron hello, I am sorry for the comment that I have returned to you for so long.And In the case if the requested version is below our min that you mentioned, I might think revert back to the min SDK version is unused.Firstly, as @MBach said, there is no one will use sdk version lower than 21.Secondly, if the project sdk version lower than 21. they must set their sdk version bigger rather than the android built will be conflicted.Thanks for reading my poor English😜