-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
66 lines (63 loc) · 2.14 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
///////////////////////////////////////////////////////////////////////////////
// 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:7.3.1")
}
}
///////////////////////////////////////////////////////////////////////////////
// APP CONFIGURATION
///////////////////////////////////////////////////////////////////////////////
allprojects {
repositories {
maven (url = "https://s01.oss.sonatype.org/content/repositories/snapshots" )
mavenCentral()
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", "Famoco_keyple-plugin-se-communication-lib")
property("sonar.organization", "famoco")
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)
}
}
}
}
}