Skip to content

Commit 17464a1

Browse files
committed
fix: gradle
1 parent 256a08d commit 17464a1

7 files changed

Lines changed: 55 additions & 78 deletions

File tree

.idea/AndroidProjectSystem.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 23 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,31 @@
1-
plugins {
2-
kotlin("jvm") version libs.versions.kotlin.get()
3-
`java-library`
4-
alias(libs.plugins.deployer)
5-
alias(libs.plugins.dokka)
6-
}
7-
8-
group = "dev.nextftc"
9-
version = property("version") as String
1+
import io.deepmedia.tools.deployer.DeployerExtension
2+
import org.gradle.kotlin.dsl.assign
3+
import org.gradle.kotlin.dsl.configure
104

11-
dependencies {
12-
testImplementation(libs.bundles.kotest)
13-
testImplementation(libs.mockk) // if needed
14-
api(libs.functional.interfaces) // if needed
15-
}
16-
17-
tasks.test {
18-
useJUnitPlatform()
19-
}
5+
plugins {
6+
alias(libs.plugins.kotlin.jvm) apply false
7+
alias(libs.plugins.kotlin.android) apply false
8+
alias(libs.plugins.android.library) apply false
209

21-
kotlin {
22-
jvmToolchain(17)
10+
alias(libs.plugins.nextftc.publishing)
11+
alias(libs.plugins.dokka)
2312
}
2413

25-
val dokkaJar = tasks.register<Jar>("dokkaJar") {
26-
dependsOn(tasks.named("dokkaGenerate"))
27-
from(dokka.basePublicationsDirectory.dir("html"))
28-
archiveClassifier = "html-docs"
14+
allprojects {
15+
version = property("version") as String
16+
group = "dev.nextftc"
2917
}
3018

31-
deployer {
32-
projectInfo {
33-
name = "Extensions"
34-
description = "Extensions to integrate NextFTC with other libraries"
35-
url = "https://nextftc.dev/extensions"
36-
scm {
37-
fromGithub("NextFTC", "Extensions")
19+
subprojects {
20+
extensions.configure<DeployerExtension> {
21+
projectInfo {
22+
url = "https://nextftc.dev/nextftc"
23+
scm {
24+
fromGithub("NextFTC", "NextFTC")
25+
}
26+
developer("Davis Luxenberg", "davis.luxenberg@outlook.com", url = "https://github.com/BeepBot99")
27+
developer("Rowan McAlpin", "rowan@nextftc.dev", url = "https://rowanmcalpin.com")
28+
developer("Zach Harel", "ftc@zharel.me", url = "https://github.com/zachwaffle4")
3829
}
39-
license("GNU General Public License, version 3", "https://www.gnu.org/licenses/gpl-3.0.html")
40-
41-
// TODO: for each developer:
42-
developer("Rowan McAlpin", "rowan@nextftc.dev", url = "https://rowanmcalpin.com")
4330
}
44-
45-
signing {
46-
key = secret("MVN_GPG_KEY")
47-
password = secret("MVN_GPG_PASSWORD")
48-
}
49-
50-
content {
51-
kotlinComponents {
52-
kotlinSources()
53-
docs(dokkaJar)
54-
}
55-
}
56-
57-
localSpec {
58-
release.version = "$version-LOCAL"
59-
}
60-
61-
nexusSpec("snapshot") {
62-
release.version = "$version-SNAPSHOT"
63-
repositoryUrl = "https://central.sonatype.com/repository/maven-snapshots/"
64-
auth {
65-
user = secret("SONATYPE_USERNAME")
66-
password = secret("SONATYPE_PASSWORD")
67-
}
68-
}
69-
70-
centralPortalSpec {
71-
auth {
72-
user = secret("SONATYPE_USERNAME")
73-
password = secret("SONATYPE_PASSWORD")
74-
}
75-
allowMavenCentralSync = (property("automaticMavenCentralSync") as String).toBoolean()
76-
}
77-
}
78-
79-
//TODO: Configure Dokka if desired
31+
}

gradle/libs.versions.toml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
[versions]
2-
kotlin = "2.1.20"
2+
kotlin = "2.0.0"
3+
android = "8.7.3"
4+
nextftc = "1.0.0-SNAPSHOT"
35
kotest = "5.9.1"
6+
ftc = "10.3.0"
47

58
[libraries]
69
kotest-runner = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }
710
kotest-assertations = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
811
kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" }
912
mockk = { module = "io.mockk:mockk", version = "1.14.2" } # if needed
1013
functional-interfaces = { module = "dev.nextftc:functional-interfaces", version = "1.0.1" } # if needed
14+
ftc-robot-core = { group = "org.firstinspires.ftc", name = "RobotCore", version.ref = "ftc" }
15+
ftc-hardware = { group = "org.firstinspires.ftc", name = "Hardware", version.ref = "ftc" }
16+
ftc-common = { group = "org.firstinspires.ftc", name = "FtcCommon", version.ref = "ftc" }
17+
nextftc-core = { group = "dev.nextftc", name = "core", version.ref = "nextftc" }
18+
nextftc-ftc = { group = "dev.nextftc", name = "ftc", version.ref = "nextftc" }
19+
nextftc-hardware = { group = "dev.nextftc", name = "hardware", version.ref = "nextftc" }
1120

1221
[bundles]
1322
kotest = ["kotest-runner", "kotest-assertations", "kotest-property"]
23+
ftc = ["ftc-robot-core", "ftc-hardware", "ftc-common"]
24+
nextftc = ["nextftc-core", "nextftc-ftc", "nextftc-hardware"]
1425

1526
[plugins]
16-
deployer = { id = "io.deepmedia.tools.deployer", version = "0.18.0" }
17-
dokka = { id = "org.jetbrains.dokka", version = "2.0.0" }
27+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
28+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
29+
android-library = { id = "com.android.library", version.ref = "android" }
30+
nextftc-publishing = { id = "dev.nextftc.publishing.multi-module", version = "1.0.1" }
31+
dokka = { id = "org.jetbrains.dokka", version.ref = "kotlin" }

pedro/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ android {
2727
}
2828

2929
dependencies {
30-
implementation(project(":core"))
31-
implementation(project(":ftc"))
30+
implementation(libs.bundles.nextftc)
3231
compileOnly(libs.bundles.ftc)
32+
33+
testImplementation(libs.bundles.kotest)
34+
testImplementation(libs.mockk)
3335
}
3436

3537
description =

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencyResolutionManagement {
1313
repositories {
1414
google()
1515
mavenCentral()
16+
maven("https://central.sonatype.com/repository/maven-snapshots/")
1617
}
1718
}
1819

0 commit comments

Comments
 (0)