Skip to content

Commit

Permalink
fix: load before-plugins.gradle in build.gradle to allow to overrid…
Browse files Browse the repository at this point in the history
…e `androidBuildToolsVersion` and other vars
  • Loading branch information
farfromrefug authored and rigor789 committed Mar 5, 2022
1 parent 77585ad commit d926dd4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ version of the {N} CLI install a previous version of the runtime package - 'tns

}

def applyBeforePluginGradleConfiguration = { ->
def appResourcesPath = getAppResourcesPath()
def pathToBeforePluginGradle = "$appResourcesPath/Android/before-plugins.gradle"
def beforePluginGradle = file(pathToBeforePluginGradle)
if (beforePluginGradle.exists()) {
outLogger.withStyle(Style.SuccessHeader).println "\t + applying user-defined configuration from ${beforePluginGradle}"
apply from: pathToBeforePluginGradle
}
}
def applyBuildScriptConfigurations = { ->
def absolutePathToAppResources = getAppResourcesPath()
def pathToBuildScriptGradle = "$absolutePathToAppResources/Android/rootbuildscript.gradle"
Expand All @@ -143,6 +152,7 @@ version of the {N} CLI install a previous version of the runtime package - 'tns

initialize()
applyBuildScriptConfigurations()
applyBeforePluginGradleConfiguration()

def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "${kotlin_version}"
}
Expand Down

0 comments on commit d926dd4

Please sign in to comment.