Skip to content

Commit 2e7c794

Browse files
committed
Enable gradle configuration cache
1 parent ac3bef1 commit 2e7c794

6 files changed

Lines changed: 22 additions & 11 deletions

File tree

build-logic/src/main/kotlin/conventions.shadow.gradle.kts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,23 @@ plugins {
33
id("com.gradleup.shadow")
44
}
55

6+
interface Injected {
7+
@get:Inject val fs: FileSystemOperations
8+
}
9+
610
tasks {
7-
shadowJar {
11+
val shadowJar by existing(com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar::class) {
812
archiveBaseName.set("${rootProject.name}-${project.name}")
913
archiveClassifier.set(null as String?)
14+
}
1015

11-
doLast {
12-
copy {
13-
from(archiveFile)
14-
into("${rootProject.projectDir}/build")
15-
}
16-
}
16+
register<Copy>("copyShadowJar") {
17+
dependsOn(shadowJar)
18+
from(shadowJar.flatMap { it.archiveFile })
19+
into(rootProject.layout.buildDirectory)
1720
}
1821

1922
named("build") {
20-
dependsOn(shadowJar)
23+
dependsOn("copyShadowJar")
2124
}
2225
}

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
plugins {
2-
eclipse
32
id("conventions.base")
43
}

core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sourceSets {
2323
property("url", project.property("url").toString())
2424
property("author", project.property("author").toString())
2525
property("gitBranch", indraGit.branchName())
26-
property("gitCommit", indraGit.commit()?.name)
26+
property("gitCommit", indraGit.commit().get().name)
2727
}
2828
}
2929
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ url=https://github.com/RealTriassic/plugin-template
99
org.gradle.caching=true
1010
org.gradle.parallel=true
1111
org.gradle.configureondemand=true
12+
org.gradle.configuration-cache=true
1213

1314
org.gradle.warning.mode=all

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ slf4j = "2.0.17"
66

77
[plugins]
88
blossom = { id = "net.kyori.blossom", version = "2.1.0" }
9-
indra-git = { id = "net.kyori.indra.git", version = "3.2.0" }
9+
indra-git = { id = "net.kyori.indra.git", version = "4.0.0-SNAPSHOT" }
1010

1111
[libraries]
1212
# Adventure Libraries

settings.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
33

44
dependencyResolutionManagement {
55
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
6+
67
repositories {
78
mavenCentral()
89
maven("https://repo.opencollab.dev/main/")
910
maven("https://repo.papermc.io/repository/maven-public/")
11+
maven("https://repo.papermc.io/repository/maven-snapshots/")
1012
maven("https://oss.sonatype.org/content/repositories/snapshots") {
1113
mavenContent {
1214
snapshotsOnly()
@@ -17,8 +19,14 @@ dependencyResolutionManagement {
1719

1820
pluginManagement {
1921
includeBuild("build-logic")
22+
2023
repositories {
2124
gradlePluginPortal()
25+
maven("https://repo.papermc.io/repository/maven-snapshots/") {
26+
mavenContent {
27+
snapshotsOnly()
28+
}
29+
}
2230
}
2331
}
2432

0 commit comments

Comments
 (0)