-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
70 lines (68 loc) · 2.42 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
///////////////////////////////////////////////////////////////////////////////
// GRADLE CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
plugins {
id("com.diffplug.spotless") version "5.10.2"
id("org.sonarqube") version "3.1"
id("org.jetbrains.dokka") version "1.4.32"
}
buildscript {
val kotlinVersion: String by project
repositories {
mavenLocal()
maven(url = "https://repo.eclipse.org/service/local/repositories/maven_central/content")
mavenCentral()
google()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("com.android.tools.build:gradle:4.1.3")
classpath("org.eclipse.keyple:keyple-gradle:0.2.+") { isChanging = true }
}
}
///////////////////////////////////////////////////////////////////////////////
// APP CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
allprojects{
group = "org.calypsonet.keyple"
repositories {
mavenLocal()
maven(url = "https://repo.eclipse.org/service/local/repositories/maven_central/content")
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots")
google()
}
}
///////////////////////////////////////////////////////////////////////////////
// TASKS CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
tasks {
spotless {
kotlin{
target("**/*.kt")
ktfmt()
licenseHeaderFile("${project.rootDir}/LICENSE_HEADER")
}
java {
target("**/src/**/*.java")
licenseHeaderFile("${project.rootDir}/LICENSE_HEADER")
importOrder("java", "javax", "org", "com", "")
removeUnusedImports()
googleJavaFormat()
}
}
sonarqube {
properties {
property("sonar.projectKey", "eclipse_" + project.name)
property("sonar.organization", "eclipse")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.login", System.getenv("SONAR_LOGIN"))
System.getenv("BRANCH_NAME")?.let {
if (it != "main") {
property("sonar.branch.name", it)
}
}
}
}
}