-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
110 lines (93 loc) · 2.48 KB
/
build.gradle.kts
File metadata and controls
110 lines (93 loc) · 2.48 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
plugins {
alias(libs.plugins.kotlinJvm)
`java-gradle-plugin`
alias(libs.plugins.ktlint)
alias(libs.plugins.detekt)
`maven-publish`
signing
kotlin("plugin.serialization") version "1.9.24"
}
ktlint {
debug.set(false)
verbose.set(true)
android.set(false)
outputToConsole.set(true)
ignoreFailures.set(false)
enableExperimentalRules.set(true)
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
detekt {
toolVersion = libs.versions.detekt.get()
config.setFrom(file("config/detekt/detekt.yml"))
buildUponDefaultConfig = true
}
group = property("GROUP").toString()
version = property("VERSION").toString()
gradlePlugin {
plugins {
create("reactBrownfieldGradlePlugin") {
id = property("PROJECT_ID").toString()
implementationClass = property("IMPLEMENTATION_CLASS").toString()
}
}
}
publishing {
publications.withType<MavenPublication>().configureEach {
artifactId = property("ARTIFACT_ID").toString()
}
publications {
create<MavenPublication>("mavenLocal") {
from(components["java"])
groupId = property("GROUP").toString()
artifactId = property("ARTIFACT_ID").toString()
version = property("VERSION").toString()
pom {
name.set(property("DISPLAY_NAME").toString())
description.set(property("DESCRIPTION").toString())
url.set(property("GITHUB_URL").toString())
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
distribution.set("repo")
}
}
}
}
}
repositories {
mavenLocal()
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation(libs.agp)
implementation(libs.common)
implementation(libs.asm.commons)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
}
tasks.named("detekt").configure {
dependsOn(":ktlintFormat")
}
tasks.register("lint") {
dependsOn(":ktlintFormat")
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
options {
encoding = "UTF-8"
source = "8"
}
}