Skip to content

Commit db88625

Browse files
committed
Fix Gradle
1 parent 3332054 commit db88625

File tree

2 files changed

+46
-53
lines changed

2 files changed

+46
-53
lines changed

build.gradle.kts

Lines changed: 37 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,30 @@ repositories {
3939
mavenCentral()
4040
}
4141

42-
allprojects {
43-
extra.set("dokka.outputDirectory", rootDir.resolve("docs"))
44-
group = property("projects.group").toString()
45-
version = property("projects.version").toString()
46-
setupDetekt()
47-
48-
java {
49-
sourceCompatibility = VERSION_1_8
50-
targetCompatibility = VERSION_1_8
42+
group = property("projects.group").toString()
43+
44+
java {
45+
sourceCompatibility = VERSION_1_8
46+
targetCompatibility = VERSION_1_8
47+
}
48+
49+
tasks {
50+
withType<KotlinCompile>().configureEach {
51+
kotlinOptions.jvmTarget = "1.8"
5152
}
52-
53-
tasks {
54-
withType<KotlinCompile>().configureEach {
55-
kotlinOptions.jvmTarget = "1.8"
56-
}
5753

58-
withType<Test>().configureEach {
59-
maxParallelForks = Runtime.getRuntime().availableProcessors()
60-
useJUnitPlatform()
61-
testLogging {
62-
exceptionFormat = TestExceptionFormat.FULL
63-
events = setOf(PASSED, SKIPPED, FAILED, STANDARD_OUT, STANDARD_ERROR)
64-
}
54+
withType<Test>().configureEach {
55+
maxParallelForks = Runtime.getRuntime().availableProcessors()
56+
useJUnitPlatform()
57+
testLogging {
58+
exceptionFormat = TestExceptionFormat.FULL
59+
events = setOf(PASSED, SKIPPED, FAILED, STANDARD_OUT, STANDARD_ERROR)
6560
}
6661
}
67-
}
6862

69-
tasks.test {
70-
useJUnitPlatform()
63+
test {
64+
useJUnitPlatform()
65+
}
7166
}
7267

7368
kotlin {
@@ -101,6 +96,12 @@ configure<KnitPluginExtension> {
10196
siteRoot = "https://nomisrev.github.io/kotlinx-serialization-jsonpath/"
10297
}
10398

99+
configure<DetektExtension> {
100+
parallel = true
101+
buildUponDefaultConfig = true
102+
allRules = true
103+
}
104+
104105
tasks {
105106
withType<DokkaTask>().configureEach {
106107
outputDirectory.set(rootDir.resolve("docs"))
@@ -123,39 +124,27 @@ tasks {
123124
}
124125

125126
getByName("knitPrepare").dependsOn(getTasksByName("dokka", true))
126-
127+
127128
register<Delete>("cleanDocs") {
128129
val folder = file("docs").also { it.mkdir() }
129130
val docsContent = folder.listFiles().filter { it != folder }
130131
delete(docsContent)
131132
}
132-
}
133133

134-
fun Project.setupDetekt() {
135-
plugins.apply("io.gitlab.arturbosch.detekt")
134+
withType<Detekt>().configureEach {
135+
reports {
136+
html.required by true
137+
sarif.required by true
138+
txt.required by false
139+
xml.required by false
140+
}
136141

137-
configure<DetektExtension> {
138-
parallel = true
139-
buildUponDefaultConfig = true
140-
allRules = true
142+
exclude("**/example/**")
143+
exclude("**/ReadMeSpec.kt")
141144
}
142145

143-
tasks {
144-
withType<Detekt>().configureEach {
145-
reports {
146-
html.required by true
147-
sarif.required by true
148-
txt.required by false
149-
xml.required by false
150-
}
151-
152-
exclude("**/example/**")
153-
exclude("**/ReadMeSpec.kt")
154-
}
155-
156-
configureEach {
157-
if (name == "build") dependsOn(withType<Detekt>())
158-
}
146+
configureEach {
147+
if (name == "build") dependsOn(withType<Detekt>())
159148
}
160149
}
161150

gradle.properties

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ RELEASE_SIGNING_ENABLED=true
77

88
POM_NAME=kotlinx-serialization-jsonpath
99
POM_DESCRIPTION=JsonPath offers a simple DSL to work with JsonElement from Kotlinx Serialization Json, this allows you to easily work with JSON in Kotlin in a typed manner.
10-
POM_URL=https://github.com/nomisrev/kotlinx-serialization-jsonpath
10+
POM_URL=https://github.com/nomisrev/kotlinx-serialization-jsonpath/
11+
1112
POM_LICENSE_NAME=The Apache Software License, Version 2.0
1213
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
14+
POM_LICENSE_DIST=repo
15+
16+
POM_SCM_URL=https://github.com/nomisrev/kotlinx-serialization-jsonpath/
17+
POM_SCM_CONNECTION=scm:git:git://github.com/nomisRev/kotlinx-serialization-jsonpath.git
18+
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/nomisRev/kotlinx-serialization-jsonpath.git
19+
1320
POM_DEVELOPER_ID=nomisRev
1421
POM_DEVELOPER_NAME=Simon Vergauwen
15-
POM_DEVELOPER_URL=https://github.com/nomisRev
16-
POM_SMC_URL=https://github.com/nomisrev/kotlinx-serialization-jsonpath
17-
POM_SMC_CONNECTION=scm:git:git://github.com/nomisRev/kotlinx-serialization-jsonpath
18-
POM_SMC_DEVELOPER_CONNECTION=scm:git:ssh://git@github.com/nomisRev/kotlinx-serialization-jsonpath.git
22+
POM_DEVELOPER_URL=https://github.com/nomisRev/

0 commit comments

Comments
 (0)