enrecipes/platforms/android/build.gradle

54 lines
1.6 KiB
Groovy
Raw Normal View History

2020-12-01 07:11:41 +00:00
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
def initialize = { ->
def userDir = "${rootProject.projectDir}/../.."
apply from: "$rootDir/gradle-helpers/user_properties_reader.gradle"
apply from: "$rootDir/gradle-helpers/paths.gradle"
rootProject.ext.userDefinedGradleProperties = getUserProperties("${getAppResourcesPath(userDir)}/Android")
if (rootProject.hasProperty("userDefinedGradleProperties")) {
rootProject.ext.userDefinedGradleProperties.each { entry ->
def propertyName = entry.getKey()
def propertyValue = entry.getValue()
project.ext.set(propertyName, propertyValue)
}
}
}
initialize()
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.72"
}
def kotlinVersion = computeKotlinVersion()
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
allprojects {
repositories {
google()
jcenter()
}
beforeEvaluate { project ->
if (rootProject.hasProperty("userDefinedGradleProperties")) {
rootProject.ext.userDefinedGradleProperties.each { entry ->
def propertyName = entry.getKey()
def propertyValue = entry.getValue()
project.ext.set(propertyName, propertyValue)
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}