-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
64 lines (53 loc) · 1.63 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
import java.nio.file.Paths
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
id 'java-library'
id 'signing'
id "com.vanniktech.maven.publish" version "0.30.0"
}
group 'org.deltacv'
version '2.1.0-D'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
sourceSets {
main {
resources {
// include native libs in the output jar
srcDirs "lib/"
}
}
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'org.deltacv.EOCV-Sim:Common:3.8.4'
compileOnly "org.openpnp:opencv:4.5.5-1"
}
tasks.register('writeBuildClassJava') {
String date = DateTimeFormatter.ofPattern("yyyy-M-d hh:mm:ss").format(LocalDateTime.now())
File versionFile = Paths.get(
projectDir.absolutePath, 'src', 'main', 'java',
'io', 'github', 'deltacv', 'apriltag', 'Build.java'
).toFile()
versionFile.delete()
versionFile << "package io.github.deltacv.apriltag;\n" +
"\n" +
"/*\n" +
" * Autogenerated file! Do not manually edit this file, as\n" +
" * it is regenerated any time the build task is run.\n" +
" *\n" +
" * Based from PhotonVision PhotonVersion generator task\n" +
" */\n" +
"@SuppressWarnings(\"ALL\")\n" +
"public final class Build {\n" +
" public static final String versionString = \"$version\";\n" +
" public static final String buildDate = \"$date\";\n" +
"}"
}
build.dependsOn writeBuildClassJava