forked from DolphFlynn/jwt-editor
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
120 lines (100 loc) · 3.31 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
120 lines (100 loc) · 3.31 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
111
112
113
114
115
116
117
118
119
120
plugins {
id("java")
id("checkstyle")
}
group = "com.blackberry"
version = "2.6.1"
description = "jwt-editor"
repositories {
mavenCentral()
maven { url = uri("https://www.jetbrains.com/intellij-repository/releases") }
maven { url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/") }
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
checkstyle {
toolVersion = "10.12.4"
}
configurations {
create("guiGenerationTask")
}
dependencies {
add("guiGenerationTask", libs.intellij.java.compiler.ant)
compileOnly(libs.montoya.api)
implementation(libs.bcprov)
implementation(libs.bcpkix)
implementation(libs.intellij.gui.forms)
implementation(libs.nimbus.jose.jwt)
implementation(libs.deltahex)
implementation(libs.rsyntaxtextarea)
implementation(libs.json)
testImplementation(libs.bcprov)
testImplementation(libs.bcpkix)
testImplementation(libs.montoya.api)
testImplementation(libs.junit.jupiter)
testImplementation(libs.assertj.core)
testImplementation(libs.mockito.core)
testRuntimeOnly(libs.junit.platform.launcher)
}
tasks.withType<Checkstyle> {
reports {
xml.required = false
html.required = true
}
}
tasks.withType<JavaCompile> {
val mainSourceSets = project.sourceSets["main"]
doLast {
mainSourceSets.output.classesDirs.forEach { mkdir(it) }
ant.withGroovyBuilder {
"taskdef"(
"name" to "javac2",
"classname" to "com.intellij.ant.Javac2",
"classpath" to configurations["guiGenerationTask"].asPath
)
}
ant.withGroovyBuilder {
"javac2"(
"srcdir" to mainSourceSets.java.srcDirs.joinToString(":"),
"classpath" to mainSourceSets.compileClasspath.asPath,
"destdir" to mainSourceSets.output.classesDirs.singleFile,
"release" to targetCompatibility.toString(),
"includeAntRuntime" to false
)
}
}
}
tasks.named<Test>("test") {
useJUnitPlatform()
systemProperty("user.timezone", "UTC")
}
tasks.named<Jar>("jar") {
dependsOn("test")
archiveBaseName.set(project.name)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(
configurations.runtimeClasspath.get().map {
if (it.isDirectory) it else zipTree(it)
.matching {
exclude(
"org/exbin/deltahex/swing/DefaultCodeAreaCommandHandler.class",
"org/exbin/deltahex/swing/DefaultCodeAreaCommandHandler\$1.class",
"org/exbin/deltahex/swing/DefaultCodeAreaCommandHandler\$2.class",
"org/exbin/deltahex/swing/DefaultCodeAreaCommandHandler\$BinaryDataClipboardData.class",
"org/exbin/deltahex/swing/DefaultCodeAreaCommandHandler\$ClipboardData.class",
"org/exbin/deltahex/swing/DefaultCodeAreaCommandHandler\$CodeDataClipboardData.class",
"META-INF/BC2048KE.DSA",
"META-INF/BC2048KE.SF",
"META-INF/LICENSE"
)
}
}
)
from(rootDir) {
include("LICENSE.md")
into("META-INF")
}
}