-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
108 lines (95 loc) · 3.23 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
// https://github.com/gradle-nexus/publish-plugin
plugins {
id "java-library"
id "maven-publish"
id "signing"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
id "de.undercouch.download" version "5.4.0"
id "pmd"
}
repositories {
mavenCentral()
}
group = 'com.spertus'
version = '1.0.1'
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'Jacquard'
description = 'Java autograder with Gradescope integration'
url = 'https://github.com/jacquard-autograder/jacquard'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'espertus'
name = 'Ellen Spertus'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/jacquard-autograder/jacquard.git'
developerConnection = 'scm:git:ssh://github.com:jacquard-autograder/jacquard.git'
url = 'http://github.com/jacquard-autograder/jacquard'
}
}
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
compileTestJava {
options.compilerArgs += ['-Xlint:deprecation']
}
signing {
sign(publishing.publications["mavenJava"])
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
dependencies {
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.25.8'
implementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
implementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
implementation 'org.junit.platform:junit-platform-launcher:1.10.2'
implementation 'org.junit.platform:junit-platform-console:1.10.2'
implementation 'org.jacoco:org.jacoco.core:0.8.11'
implementation 'org.json:json:20240303'
implementation 'net.sourceforge.pmd:pmd:7.0.0-rc4'
implementation 'net.sourceforge.pmd:pmd-java:7.0.0-rc4'
// Prevent slf4j warning through pmd dependency
implementation 'org.slf4j:slf4j-nop:1.7.36'
}
tasks.register('installCheckstyle', Download) {
// If checkstyle version is upgraded, update constants in CheckstyleGrader.java.
src 'https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.12.1/checkstyle-10.12.1-all.jar'
dest 'lib'
overwrite false
}
test {
dependsOn(tasks.named("installCheckstyle"))
useJUnitPlatform {
excludeTags('IndirectTest')
}
}
pmd {
consoleOutput = true
toolVersion = "6.52.0"
rulesMinimumPriority = 5
ruleSetConfig = resources.text.fromFile("config/pmd/project-rules.xml")
ruleSets = []
}