You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/02/08 02:48:39 UTC

[GitHub] erisu edited a comment on issue #508: Inconsistent handling of min/target SDK values

erisu edited a comment on issue #508: Inconsistent handling of min/target SDK values
URL: https://github.com/apache/cordova-android/issues/508#issuecomment-461672598
 
 
   @brodybits 
   
   >> We should be setting the values in gradle based on what's specified in config.xml (and we actually have a way to do that now via [GradlePropertiesParser](https://github.com/apache/cordova-android/blob/master/bin/templates/cordova/lib/config/GradlePropertiesParser.js) if we so desire)
   >
   >That would be really nice. Some pointers how to do this would be great. I personally have no extra time to work on this one.
   
   The defaults are added around this [line](https://github.com/apache/cordova-android/blob/54df4a116c635b76273d6862d5657858187e5e5c/bin/templates/cordova/lib/config/GradlePropertiesParser.js#L32). We could add our defaults here for the min and target SDK.
   
   Currently, users who want to modify the `gradle.properties` file would have to modify it directly but this is not the best case. Users may not commit their platform directory. This mean changes are lost each time they remove and add back a platform..
   
   This file is created by `cordova prepare` which is executed after the `cordova platform add` step. If the user wanted to modify this file and they didn't commit the platforms, the current best option is to use an `after_prepare` hook script.
   
   We could do something like this: [master...erisu:user-custom-gradle-properties-defines](https://github.com/apache/cordova-android/compare/master...erisu:user-custom-gradle-properties-defines)
   
   This would use one of our existing methods for setting the min and target SDK. The above is a working example of updating the Gradle Properties files, but I suspect there would be a lot more refactoring involved.
   
   Hope this helps...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org