Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

fix android build conflict #73

Closed
wants to merge 3 commits into from
Closed

Conversation

SunnyEver0
Copy link

#72 thanks

Copy link
Owner

@jordanbyron jordanbyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

android/build.gradle Outdated Show resolved Hide resolved
@jordanbyron
Copy link
Owner

@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
Copy link
Author

SunnyEver0 commented Jan 26, 2019

@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
Copy link
Owner

@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
Copy link
Owner

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
Copy link
Author

SunnyEver0 commented May 8, 2019

@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😜

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants