-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
104 lines (87 loc) · 2.78 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
plugins {
id "com.gradle.plugin-publish" version "1.2.1"
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
id "idea"
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenLocal()
mavenCentral()
}
dependencies {
api 'com.jcraft:jsch:0.1.55'
api 'com.google.code.gson:gson:2.8.6'
api 'org.apache.sshd:sshd-core:2.13.2'
api 'org.apache.sshd:sshd-sftp:2.13.2'
implementation 'net.i2p.crypto:eddsa:0.3.0'
testImplementation('org.spockframework:spock-core:2.0-M4-groovy-3.0') {
exclude group: 'org.codehaus.groovy'
}
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation('cglib:cglib-nodep:2.2')
testImplementation('org.objenesis:objenesis:1.2')
testImplementation gradleTestKit()
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
group = "edu.wpi.first"
version = "2025.2.0"
base {
archivesName = "DeployUtils"
}
java {
sourceCompatibility = 17
targetCompatibility = 17
}
gradlePlugin {
website = 'https://github.com/wpilibsuite/deploy-utils'
vcsUrl = 'https://github.com/wpilibsuite/deploy-utils'
plugins {
DeployUtils {
id = 'edu.wpi.first.DeployUtils'
displayName = 'DeployUtils'
implementationClass = 'edu.wpi.first.deployutils.DeployUtils'
description = 'Additions to the model-based DSL for deploying Java and Native projects to remote targets'
tags = ['remote', 'target', 'deploy', 'java', 'native']
}
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true
}
tasks.withType(Javadoc) {
options.addBooleanOption('Xdoclint:all,-missing', true)
}
def examplesFolder = file("$rootDir/testing")
tasks.register('PatchExamples') {
doLast {
String regex = "(id\\s*?[\\\"|\\']edu\\.wpi\\.first\\.DeployUtils[\\\"|\\'].*?version\\s*?[\\\"|\\'])(.+?)([\\\"|\\'])";
examplesFolder.eachFile { File file ->
if (file.isDirectory() && file.name != '_archived') {
def buildGradleFile = new File(file, 'build.gradle')
if (buildGradleFile.exists() && buildGradleFile.isFile()) {
def text = buildGradleFile.text
text = text.replaceAll(regex, "id \"edu.wpi.first.DeployUtils\" version \"${version}\"")
buildGradleFile.text = text
}
}
}
}
}
build.dependsOn PatchExamples
jar.finalizedBy PatchExamples
wrapper {
gradleVersion = '8.10.2'
distributionType = Wrapper.DistributionType.BIN
}