Skip to content

added support for before-plugins.gradle file applied before plugin #1185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions test-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,17 @@ def getAppResourcesPath = { ->
project.ext.appResourcesPath = absolutePathToAppResources

return absolutePathToAppResources
};
}

def applyBeforePluginGradleConfiguration = { ->
def appResourcesPath = getAppResourcesPath()
def pathToBeforePluginGradle = "$appResourcesPath/Android/before-plugins.gradle"
def beforePluginGradle = file(pathToBeforePluginGradle)
if (beforePluginGradle.exists()) {
println "\t + applying user-defined configuration from ${beforePluginGradle}"
apply from: pathToBeforePluginGradle
}
}

def applyAppGradleConfiguration = { ->
def appResourcesPath = getAppResourcesPath()
Expand Down Expand Up @@ -212,6 +222,7 @@ android {
}

setAppIdentifier()
applyBeforePluginGradleConfiguration()
applyPluginGradleConfigurations()
applyAppGradleConfiguration()
}
Expand Down Expand Up @@ -251,7 +262,7 @@ dependencies {
supportVer = supportVersion
}

println "Using support version $supportVer"
println "Using support library version $supportVer"

implementation "com.android.support:multidex:1.0.2"
implementation "com.android.support:support-v4:$supportVer"
Expand Down