build: buildscript dependency on build-logic 2/2
buildSrc was a special thing from before gradle had composite builds. build-logic is included like any other included build.develop
parent
49555e7086
commit
9a54577cfa
|
@ -28,3 +28,5 @@ dependencies {
|
|||
|
||||
api(kotlin("test"))
|
||||
}
|
||||
|
||||
group = "org.terasology.gradology"
|
||||
|
|
22
build.gradle
22
build.gradle
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2020 The Terasology Foundation
|
||||
// Copyright 2021 The Terasology Foundation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Dependencies needed for what our Gradle scripts themselves use. It cannot be included via an external Gradle file :-(
|
||||
|
@ -8,6 +8,13 @@ buildscript {
|
|||
jcenter()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
|
||||
maven {
|
||||
// required to provide runtime dependencies to build-logic.
|
||||
name = "Terasology Artifactory"
|
||||
url = "http://artifactory.terasology.org/artifactory/virtual-repo-live"
|
||||
allowInsecureProtocol = true // 😱
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -20,10 +27,12 @@ buildscript {
|
|||
|
||||
// SonarQube / Cloud scanning
|
||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8"
|
||||
|
||||
// Our locally included /build-logic
|
||||
classpath("org.terasology.gradology:build-logic")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
plugins {
|
||||
// Needed for extending the "clean" task to also delete custom stuff defined here like natives
|
||||
id "base"
|
||||
|
@ -39,18 +48,13 @@ plugins {
|
|||
}
|
||||
|
||||
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||
import org.jetbrains.gradle.ext.ActionDelegationConfig
|
||||
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.StandardCopyOption
|
||||
import static org.gradle.internal.logging.text.StyledTextOutput.Style
|
||||
|
||||
// Test for right version of Java in use for running this script
|
||||
assert org.gradle.api.JavaVersion.current().isJava8Compatible()
|
||||
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||
import static org.gradle.internal.logging.text.StyledTextOutput.Style
|
||||
|
||||
// Check for Java 8
|
||||
if(!(JavaVersion.current() == JavaVersion.VERSION_1_8 || JavaVersion.current() == JavaVersion.VERSION_11)) {
|
||||
def out = services.get(StyledTextOutputFactory).create("an-ouput")
|
||||
|
|
|
@ -14,8 +14,8 @@ import kotlin.test.fail
|
|||
|
||||
plugins {
|
||||
application
|
||||
`terasology-dist`
|
||||
facade
|
||||
id("terasology-dist")
|
||||
id("facade")
|
||||
}
|
||||
|
||||
// Grab all the common stuff like plugins to use, artifact repositories, code analysis config
|
||||
|
|
|
@ -6,7 +6,7 @@ import org.terasology.gradology.moduleDependencyArtifacts
|
|||
import org.terasology.gradology.namedAttribute
|
||||
|
||||
plugins {
|
||||
`terasology-repositories`
|
||||
id("terasology-repositories")
|
||||
`java-platform`
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import groovy.io.FileType
|
|||
|
||||
rootProject.name = 'Terasology'
|
||||
|
||||
includeBuild("build-logic")
|
||||
include 'engine', 'engine-tests', 'facades', 'metas', 'libs', 'modules'
|
||||
|
||||
// Handy little snippet found online that'll "fake" having nested settings.gradle files under /modules, /libs, etc
|
||||
|
|
Loading…
Reference in New Issue