Files
sailing-analytics/build.gradle
T

99 lines
2.4 KiB
Groovy

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
if (project.hasProperty("xmake")) {
repositories {
maven {
url commonRepoURL
}
}
} else {
repositories {
jcenter()
google()
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.3"
}
repositories {
google()
}
}
// plugins {
// id "com.diffplug.gradle.spotless" version "3.14.0"
// }
allprojects {
if (project.hasProperty("xmake")) {
repositories {
maven {
url commonRepoURL
}
}
} else {
repositories {
jcenter()
google()
}
}
version = "1.0.0-SNAPSHOT"
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
}
defaultTasks 'clean', 'assemble'
}
// dependency versions for all sub modules
ext {
// regular
buildTools = "28.0.3"
compileSdk = 28
minSdk = 16
targetSdk = 28
sourceCompatibilityVersion = JavaVersion.VERSION_1_8
targetCompatibilityVersion = JavaVersion.VERSION_1_8
support = "27.1.1"
play_services = "12.0.1"
license_dialog = "1.8.0"
// testing - jvm
junit = "4.12"
mockito = "1.9.5"
// testing - ui
test = "0.2"
espresso = "2.1"
isXmakeBuild = project.hasProperty("xmake")
isReleaseBuild = Boolean.parseBoolean(System.env.XMAKE_RELEASE_BUILD)
destinationFolder = new File("").absolutePath + "/java/com.sap.sailing.www/apps/"
}
if (!project.hasProperty("xmake")) {
spotless {
java {
importOrder "java", "javax", "org", "com", ""
removeUnusedImports()
eclipse().configFile("java/CodeFormatter.xml")
target project.fileTree(project.rootDir) {
include "mobile/com.sap.*/**/*.java"
exclude "**/generated*/**/*.*", "**/gen/**/*"
}
}
}
}
if (project.hasProperty("xmake")) {
task wrapper(type: Wrapper) {
distributionUrl "${sapGradleDistBaseUrl}/${sapGradleVersion}/gradle-${sapGradleVersion}-all.zip"
}
}