-
Notifications
You must be signed in to change notification settings - Fork 34
/
build.gradle.kts
95 lines (77 loc) · 2.34 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
91
92
93
94
95
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.6.20-RC"
}
val meepMeepVersion = "1.0-SNAPSHOT"
group = "com.noahbres.meepmeep"
version = "1.0-SNAPSHOT"
val pomUrl = "https://github.com/NoahBres/MeepMeep"
val pomScmUrl = "https://github.com/NoahBres/MeepMeep"
val pomIssueUrl = "https://github.com/NoahBres/MeepMeep/issues"
val pomDesc = "https://github.com/NoahBres/MeepMeep"
val githubRepo = "NoahBres/MeepMeep"
val githubReadme = "README.md"
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here
maven(url = "https://maven.brott.dev/")
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
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:0.5.5")
}
sourceSets["main"].java {
srcDir("src/main/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.noahbres.meepmeep"
artifactId = "meepmeep"
version = meepMeepVersion
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"
}