mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-10-22 15:32:29 +00:00
Move buildSrc to build-logic
What Gradle recommends seems to have gone pretty back-and-forth on this, but it seems like this is the standard these days.
This commit is contained in:
+6
-12
@@ -3,23 +3,19 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# Build directories
|
||||
/classes
|
||||
/logs
|
||||
/build
|
||||
/projects/*/logs
|
||||
/projects/fabric/fabricloader.log
|
||||
/build-logic/*/build
|
||||
/build-logic/build
|
||||
/projects/*/build
|
||||
|
||||
/projects/*/src/generated/resources/.cache
|
||||
/projects/*/src/test/generated_tests/
|
||||
/buildSrc/build
|
||||
/out
|
||||
/buildSrc/out
|
||||
/jars
|
||||
/doc/out/
|
||||
/projects/*/logs
|
||||
|
||||
/node_modules
|
||||
.jqwik-database
|
||||
|
||||
# Runtime directories
|
||||
/run
|
||||
/projects/*/run
|
||||
|
||||
*.ipr
|
||||
@@ -35,5 +31,3 @@
|
||||
/.settings
|
||||
/.vscode
|
||||
*.launch
|
||||
|
||||
/projects/*/src/generated/resources/.cache
|
||||
|
||||
@@ -5,29 +5,6 @@
|
||||
plugins {
|
||||
`java-gradle-plugin`
|
||||
`kotlin-dsl`
|
||||
alias(libs.plugins.gradleVersions)
|
||||
alias(libs.plugins.versionCatalogUpdate)
|
||||
}
|
||||
|
||||
// Duplicated in settings.gradle.kts
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
|
||||
maven("https://maven.fabricmc.net/") {
|
||||
name = "Fabric"
|
||||
content {
|
||||
includeGroup("net.fabricmc")
|
||||
includeGroup("net.fabricmc.unpick")
|
||||
}
|
||||
}
|
||||
|
||||
maven("https://maven.squiddev.cc") {
|
||||
name = "SquidDev"
|
||||
content {
|
||||
includeGroup("cc.tweaked.vanilla-extract")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -60,9 +37,3 @@ gradlePlugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
versionCatalogUpdate {
|
||||
sortByKey = false
|
||||
keep { keepUnusedVersions = true }
|
||||
catalogFile = file("../gradle/libs.versions.toml")
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.gradleVersions)
|
||||
alias(libs.plugins.versionCatalogUpdate)
|
||||
}
|
||||
|
||||
versionCatalogUpdate {
|
||||
sortByKey = false
|
||||
keep { keepUnusedVersions = true }
|
||||
catalogFile = file("../gradle/libs.versions.toml")
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
|
||||
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
|
||||
|
||||
// Duplicated in root settings.gradle.kts
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
|
||||
exclusiveContent {
|
||||
forRepositories(maven("https://maven.fabricmc.net/"))
|
||||
filter {
|
||||
includeGroup("fabric-loom")
|
||||
includeGroup("net.fabricmc")
|
||||
includeGroup("net.fabricmc.unpick")
|
||||
}
|
||||
}
|
||||
|
||||
exclusiveContent {
|
||||
forRepositories(maven("https://maven.squiddev.cc"))
|
||||
filter {
|
||||
includeGroup("cc.tweaked.vanilla-extract")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "build-logic"
|
||||
|
||||
include("base")
|
||||
+1
-1
@@ -11,8 +11,8 @@ plugins {
|
||||
publishing
|
||||
alias(libs.plugins.githubRelease)
|
||||
alias(libs.plugins.gradleVersions)
|
||||
alias(libs.plugins.ideaExt)
|
||||
alias(libs.plugins.versionCatalogUpdate)
|
||||
id("org.jetbrains.gradle.plugin.idea-ext")
|
||||
id("cc-tweaked")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,6 +170,7 @@ yarn = { module = "net.fabricmc:yarn", version.ref = "yarn" }
|
||||
[plugins]
|
||||
githubRelease = { id = "com.github.breadmoirai.github-release", version.ref = "githubRelease" }
|
||||
gradleVersions = { id = "io.github.ben-manes.versions", version.ref = "gradleVersions" }
|
||||
ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "ideaExt" }
|
||||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
|
||||
versionCatalogUpdate = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdate" }
|
||||
|
||||
@@ -68,7 +68,7 @@ mentioning:
|
||||
- `web`: This contains the additional tooling for building [the documentation website][tweaked.cc], such as support for
|
||||
rendering recipes
|
||||
|
||||
- `buildSrc` (in the base directory, not in `projects/`): This contains any build logic shared between modules. For
|
||||
- `build-logic` (in the base directory, not in `projects/`): This contains any build logic shared between modules. For
|
||||
instance, `cc-tweaked.java-convention.gradle.kts` sets up the defaults for Java that we use across the whole project.
|
||||
|
||||
> **Note**
|
||||
|
||||
+10
-8
@@ -3,23 +3,23 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pluginManagement {
|
||||
// Duplicated in buildSrc/build.gradle.kts
|
||||
// Duplicated in build-logic/settings.gradle.kts
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
|
||||
maven("https://maven.fabricmc.net/") {
|
||||
name = "Fabric"
|
||||
content {
|
||||
exclusiveContent {
|
||||
forRepositories(maven("https://maven.fabricmc.net/"))
|
||||
filter {
|
||||
includeGroup("fabric-loom")
|
||||
includeGroup("net.fabricmc")
|
||||
includeGroup("net.fabricmc.unpick")
|
||||
}
|
||||
}
|
||||
|
||||
maven("https://maven.squiddev.cc") {
|
||||
name = "SquidDev"
|
||||
content {
|
||||
exclusiveContent {
|
||||
forRepositories(maven("https://maven.squiddev.cc"))
|
||||
filter {
|
||||
includeGroup("cc.tweaked.vanilla-extract")
|
||||
}
|
||||
}
|
||||
@@ -27,13 +27,15 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version("1.0.0")
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version ("1.0.0")
|
||||
}
|
||||
|
||||
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
|
||||
|
||||
rootProject.name = "cc-tweaked"
|
||||
|
||||
includeBuild("build-logic")
|
||||
|
||||
include(":core-api")
|
||||
include(":core")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user