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
Kevin Turner 2021-03-01 12:49:26 -08:00
parent 49555e7086
commit 9a54577cfa
5 changed files with 19 additions and 12 deletions

View File

@ -28,3 +28,5 @@ dependencies {
api(kotlin("test"))
}
group = "org.terasology.gradology"

View File

@ -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")

View File

@ -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

View File

@ -6,7 +6,7 @@ import org.terasology.gradology.moduleDependencyArtifacts
import org.terasology.gradology.namedAttribute
plugins {
`terasology-repositories`
id("terasology-repositories")
`java-platform`
}

View File

@ -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