-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
133 lines (118 loc) · 3.4 KB
/
build.gradle
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
121
122
123
124
125
126
127
128
129
130
131
buildscript {
repositories {
jcenter()
}
dependencies {
classpath(
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion",
"com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintrayPluginVersion"
)
}
}
group = "org.abhijitsarkar"
version = "1.1.0"
apply plugin: "kotlin"
apply plugin: "idea"
apply plugin: "application"
apply plugin: "maven"
apply plugin: "com.jfrog.bintray"
repositories {
jcenter()
}
configurations {
jaxb
}
dependencies {
implementation(
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion",
"org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion",
"org.slf4j:slf4j-api:$slf4jVersion",
"ch.qos.logback:logback-classic:$logbackVersion",
"com.xenomachina:kotlin-argparser:$kotlinArgparserVersion"
)
jaxb(
"com.sun.xml.bind:jaxb-core:$jaxbVersion",
"com.sun.xml.bind:jaxb-impl:$jaxbVersion",
"com.sun.xml.bind:jaxb-xjc:$jaxbVersion"
)
testImplementation(
"org.jetbrains.kotlin:kotlin-test:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
)
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
jvmTarget = "1.8"
allWarningsAsErrors = true
}
}
kotlin {
experimental {
coroutines "enable"
}
}
def schemaDir = "src/main/resources"
def generatedSources = "$buildDir/generated-sources"
def xjcOutputDir = "$generatedSources/java/main"
sourceSets {
main {
java {
srcDirs files(xjcOutputDir) {
builtBy("xjc")
}
}
}
}
task xjc {
inputs.dir "$schemaDir"
outputs.dir "$xjcOutputDir"
doLast {
project.ant {
taskdef(
name: "xjc",
classname: "com.sun.tools.xjc.XJCTask",
classpath: configurations.jaxb.asPath)
xjc(
destdir: "$xjcOutputDir",
package: "net.sourceforge.pmd",
schema: "$schemaDir/ruleset_2_0_0.xsd",
binding: "$schemaDir/binding.xjb",
encoding: "UTF-8",
fork: true
) {
arg(line: "-verbose")
arg(line: "-no-header")
arg(line: "-mark-generated")
}
}
}
}
mainClassName = "org.abhijitsarkar.pmd.MainKt"
applicationDefaultJvmArgs = ["-Dcom.xenomachina.argparser.programName=$name"]
bintray {
user = findProperty("bintrayUser")
key = findProperty("bintrayApiKey")
configurations = ["archives"]
pkg {
repo = "mvn"
name = project.name
desc = "Migrates a pre-PMD6 ruleset to the new format"
websiteUrl = "https://github.com/asarkar/pmd-migration-tool"
issueTrackerUrl = "https://github.com/asarkar/pmd-migration-tool/issues"
vcsUrl = "https://github.com/asarkar/pmd-migration-tool.git"
githubRepo = "asarkar/pmd-migration-tool"
githubReleaseNotesFile = "README.md"
labels = ["pmd", project.name]
licenses = ["GPL-3.0"]
publicDownloadNumbers = true
version {
name = project.version
gpg {
sign = true
}
}
}
override = true
publish = true
dryRun = false
}