-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle.kts
90 lines (74 loc) · 2.22 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
// Apply the java-library plugin for API and implementation separation.
java
`java-library`
`maven-publish`
kotlin("jvm") version "1.9.0"
}
val githubRepo = "acmerobotics/MeepMeep"
val githubReadme = "README.md"
val pomUrl = "https://github.com/$githubRepo"
val pomScmUrl = "https://github.com/$githubRepo"
val pomIssueUrl = "https://github.com/$githubRepo/issues"
val pomDesc = "https://github.com/$githubRepo"
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here
maven(url = "https://maven.brott.dev/")
mavenCentral()
}
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library.
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
// Use the Kotlin test library.
testImplementation("org.jetbrains.kotlin:kotlin-test")
api("com.acmerobotics.roadrunner:core:1.0.0")
api("com.acmerobotics.roadrunner:actions:1.0.0")
}
sourceSets["main"].java {
srcDir("src/main/kotlin")
}
sourceSets["test"].java {
srcDir("src/test/kotlin")
}
// Create sources Jar from main kotlin sources
val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
}
publishing {
publications {
create<MavenPublication>("meepmeep") {
groupId = "com.acmerobotics.roadrunner"
artifactId = "MeepMeep"
version = "0.1.6"
from(components["java"])
artifact(sourcesJar)
pom {
packaging = "jar"
name.set(rootProject.name)
description.set(pomDesc)
url.set(pomUrl)
scm {
url.set(pomScmUrl)
}
}
}
}
repositories {
maven {
url = uri("$buildDir/repository")
}
}
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}