This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
122 lines (102 loc) · 3.84 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
plugins {
id("java")
id("edu.wpi.first.GradleRIO") version "2024.1.1"
id("org.jetbrains.kotlin.jvm") version "2.0.0-Beta2"
id("maven-publish")
id("org.jetbrains.dokka") version "1.8.10"
id ("com.peterabeles.gversion") version "1.10.2"
}
project.compileJava.dependsOn(createVersionFile)
gversion {
srcDir = "src/main/java/" // path is relative to the sub-project by default
// Gradle variables can also be used
// E.g. "${project.rootDir}/module/src/main/java"
classPackage = "frc.chargerlibexternal.builddata"
className = "ChargerLibBuildConstants" // optional. If not specified GVersion is used
dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'" // optional. This is the default
timeZone = "EST" // optional. UTC is default
debug = false // optional. print out extra debug information
language = "java" // optional. Can be Java, Kotlin, YAML, or Properties. Case insensitive.
explicitType = true // optional. Force types to be explicitly printed
indent = "\t" // optional. Change how code is indented. 1 tab is default.
annotate = false // optional. Java only. Adds @Generated annotation
}
group = "frc.chargers"
version = "1.0.0"
repositories {
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit")
credentials {
username = "Mechanical-Advantage-Bot"
password = "\u0067\u0068\u0070\u005f\u006e\u0056\u0051\u006a\u0055\u004f\u004c\u0061\u0079\u0066\u006e\u0078\u006e\u0037\u0051\u0049\u0054\u0042\u0032\u004c\u004a\u006d\u0055\u0070\u0073\u0031\u006d\u0037\u004c\u005a\u0030\u0076\u0062\u0070\u0063\u0051"
}
}
}
configurations.configureEach {
exclude group: "edu.wpi.first.wpilibj"
}
kotlin {
explicitApi()
//jvmToolchain(21)
compileKotlin {
compilerOptions {
freeCompilerArgs.add("-Xcontext-receivers")
freeCompilerArgs.add("-Xallow-kotlin-package")
}
}
}
dependencies {
api(wpi.java.deps.wpilib())
api(wpi.java.vendor.java())
api('io.github.battery-staple:KMeasure:1.4.0-k2')
testImplementation "io.mockk:mockk:1.13.7"
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
simulationDebug wpi.sim.enableDebug()
nativeRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.desktop)
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
simulationRelease wpi.sim.enableRelease()
implementation "gov.nist.math:jama:1.0.3"
testImplementation "io.mockk:mockk:1.13.7"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
def includeDesktopSupport = true
java {
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'frc.chargers'
artifactId = 'ChargerLib'
version = "1.0.0"
from components.kotlin
artifact(sourcesJar)
}
}
}
allprojects {
test {
scanForTestClasses false
include "**/*Test.class"
useJUnitPlatform()
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
}
}
wpi.java.configureExecutableTasks(jar)
wpi.java.configureTestTasks(test)
dokkaHtml {
dokkaSourceSets {
configureEach {
skipDeprecated.set(true)
perPackageOption {
matchingRegex.set("kotlin.internal")
suppress.set(true)
}
}
}
}