Open wing328 opened 7 years ago
There should be three different variables:
{{androidGradleVersion}}
for the version of gradle (used in classpath 'com.android.tools.build:gradle:2.3.+'
){{androidSdkVersion}}
for the compile and target sdk varion (used in compileSdkVersion 25
and targetSdkVersion 25
){{androidBuildToolsVersion}}
for the version of the build tools (used in buildToolsVersion '25.0.2'
)@auchri thanks for the elaboration.
Do we really need to add so much options just to change a version in a gradle file ?
@cbornet we can start with just --additional-properties
to make the versions more easily customizable.
@wing328 added #6160 PR. Please, review it
Closed via #6160
@auchri please pull the latest master to give it a try.
@wing328 Hello. I'm encountering problem when I want to set to set such properties while building retrofit2 library. Retrofit2 library missing in "android languge" package so I have to build it from java package. Also at least one more property requried - gradleDistributionUrl or gradleDistributionVersion, because gradle android pluging is tightly coupled to gradle version ( see chart) Do you need pull request to add same properties to "java language" package ?
@aleksandr1592 yes, we would welcome contribution (PR) to add those to the Java (retrofit2) client generator.
Description
As discussed in https://github.com/swagger-api/swagger-codegen/pull/5250, we want to leverage additional properties to more easily manage Android version numbers in the gradle files generated as part of the Android API client.
We want to replace android version number with {{androidVersionNumber}} tag in the mustache templates so that users can set it directly via
--additional-properties
when generating the API clients.Swagger-codegen version
Latest master
Suggest a Fix
If anyone has questions/suggestions or wants to work on this enhancement, please reply to let us know. Thank you.