Skip to content

Commit

Permalink
feat(android): Make variables.gradle file not mandatory (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Mar 19, 2020
1 parent 0799d52 commit 4fc5039
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions capacitor-cordova-android-plugins/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ext {
cordovaAndroidVersion = project.hasProperty('cordovaAndroidVersion') ? rootProject.ext.cordovaAndroidVersion : '7.0.0'
}

buildscript {
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion cli/src/android/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export async function handleCordovaPluginsGradle(config: Config, cordovaPlugins
await writeFileAsync(pluginsGradlePath, buildGradle);
const cordovaVariables = `// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
ext {
cdvMinSdkVersion = rootProject.ext.minSdkVersion
cdvMinSdkVersion = project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : ${config.android.minVersion}
// Plugin gradle extensions can append to this to have code run at the end.
cdvPluginPostBuildExtras = []
}`;
Expand Down

0 comments on commit 4fc5039

Please sign in to comment.