-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
86 lines (72 loc) · 2.34 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
86 lines (72 loc) · 2.34 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
plugins {
kotlin("jvm") version "2.0.20"
kotlin("plugin.serialization") version "2.0.20"
id("com.gradle.plugin-publish") version "1.2.1"
id("maven-publish")
id("java-gradle-plugin")
id("jacoco")
id("org.sonarqube") version "5.1.0.4882"
}
group = "org.gradle-webtools.minify"
version = "2.1.1"
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
if (!project.hasProperty("gradle.publish.key"))
ext["gradle.publish.key"] = System.getenv("GRADLE_PUBLISH_KEY")
if (!project.hasProperty("gradle.publish.secret"))
ext["gradle.publish.secret"] = System.getenv("GRADLE_PUBLISH_SECRET")
tasks.test {
finalizedBy("jacocoTestReport")
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
tasks.test {
finalizedBy("jacocoTestReport")
}
jacoco {
toolVersion = "0.8.12"
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
}
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")
implementation("com.google.javascript:closure-compiler:v20240317")
implementation("org.padler:closure-stylesheets:1.8.0")
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
testImplementation("io.kotest:kotest-assertions-core:5.9.1")
}
tasks.withType<Test> {
useJUnitPlatform()
}
gradlePlugin {
website.set("https://github.com/gradle-webtools/gradle-minify-plugin")
vcsUrl.set("https://github.com/gradle-webtools/gradle-minify-plugin")
plugins {
create("minifyPlugin") {
id = "org.gradlewebtools.minify"
implementationClass = "org.gradlewebtools.minify.MinifyPlugin"
displayName = "Gradle Minify Plugin"
description = "A simple gradle plugin to minify CSS and JavaScript files"
tags.set(listOf("css", "javascript", "js", "minify", "minification"))
}
}
}
sonar {
properties {
property("sonar.projectKey", "gradle-minify-plugin")
property("sonar.organization", "gradle-webtools")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.coverage.exclusions", "**/*MinifyTask*,**/*Extension*,**/*MinifierOptions*")
property("sonar.cpd.exclusions", "**/*Extension*,**/*Options*")
}
}