diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index ee95c03e5..f3908e73e 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -28,3 +28,5 @@ dependencies { api(kotlin("test")) } + +group = "org.terasology.gradology" diff --git a/build.gradle b/build.gradle index 099603d3c..efad4e58b 100644 --- a/build.gradle +++ b/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") diff --git a/facades/PC/build.gradle.kts b/facades/PC/build.gradle.kts index d1181f15f..c8643c151 100644 --- a/facades/PC/build.gradle.kts +++ b/facades/PC/build.gradle.kts @@ -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 diff --git a/modules/build.gradle.kts b/modules/build.gradle.kts index 1a070f341..50bffa685 100644 --- a/modules/build.gradle.kts +++ b/modules/build.gradle.kts @@ -6,7 +6,7 @@ import org.terasology.gradology.moduleDependencyArtifacts import org.terasology.gradology.namedAttribute plugins { - `terasology-repositories` + id("terasology-repositories") `java-platform` } diff --git a/settings.gradle b/settings.gradle index df7413c6f..2fb04fd5b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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