-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
167 lines (129 loc) · 4.69 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
plugins {
id "com.peterabeles.gversion" version "1.10.2"
}
gversion {
srcDir = "src/main/java"
classPackage = "boofcv"
className = "ValidationBoofVersion"
}
allprojects {
group = 'org.boofcv'
version = '1.1.8-SNAPSHOT'
apply plugin: 'java-library'
repositories {
mavenCentral()
mavenLocal()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
}
project.ext.set("jabel_version", '1.0.0')
java {
withJavadocJar()
withSourcesJar()
toolchain { languageVersion = JavaLanguageVersion.of(17) }
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
sourceCompatibility = 17
options.release = 11
}
javadoc { configure(options) {
failOnError = false
addStringOption('Xdoclint:none', '-quiet')
}}
dependencies {
api files("$project.rootDir/lib/ProjectBUBO.jar")
['boofcv-core', 'boofcv-io', 'boofcv-swing', 'boofcv-ffmpeg', 'boofcv-simulation', 'boofcv-kotlin',
'boofcv-pdf', 'boofcv-recognition', 'boofcv-reconstruction', 'demonstrations', 'boofcv-learning',
'applications'].each
{ String a -> api("org.boofcv:$a:$version") }
api group: 'com.google.guava', name: 'guava', version: '33.2.0-jre'
api group: 'args4j', name: 'args4j', version: '2.33'
api 'org.apache.commons:commons-lang3:3.7'
api 'com.sun.mail:javax.mail:1.6.0'
implementation("commons-io:commons-io:2.16.1")
implementation("org.yaml:snakeyaml:2.3")
annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:${project.jabel_version}")
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
}
subprojects {
// Create a jar which contains all the applications
task moduleJars(type: Jar) {
manifest {
attributes 'Implementation-Title': 'BoofCV Regression Jar',
'Implementation-Version': '1'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
outputs.upToDateWhen { false }
archiveFile.set(file('module_regression.jar'))
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from { configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } } {
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
}
}
clean.doFirst { delete "module_regression.jar" }
}
dependencies {
api project(':modules:common')
}
project.compileJava.dependsOn(createVersionFile)
task pointLabelJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Point Labeling',
'Implementation-Version': version,
'Main-Class': 'boofcv.applications.HandSelectPointsApp'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
outputs.upToDateWhen { false }
from {
configurations.compile.findAll {
it.name.matches("boofcv-(recognition|feature|geo|sfm|calibration|ip|io|swing).*") ||
it.name.matches("(common-|georegression|ddogleg|ejml).*")
}.collect {
it.isDirectory() ? it : zipTree(it)
}
}
with jar
doLast { archivePath.renameTo(file('label_points.jar')) }
}
// Create a jar which contains all the applications
task regressionJar(type: Jar, dependsOn: ':build') {
manifest {
attributes 'Implementation-Title': 'Regression Jar',
'Implementation-Version': version,
'Main-Class': 'boofcv.regression.MasterRegressionApplication'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
outputs.upToDateWhen { false }
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from { configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } } {
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
}
// from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } {
// exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
// } with jar
doLast { archivePath.renameTo(file('regression.jar')) }
}
clean.doFirst { delete "regression.jar" }
def not_modules = new ArrayList();
not_modules.addAll(subprojects.findAll { x -> x.path.startsWith(':thirdparty') })
not_modules.add(project(':modules'))
not_modules = not_modules.collect { p -> p.path }
not_modules.each { String a ->
project(a) {
jar.enabled = false
}
}
clean.doFirst {
delete "results"
delete "tmp"
}
dependencies {
api project(':modules:common')
}
wrapper {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = '7.3.3'
}