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"))
|
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
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Dependencies needed for what our Gradle scripts themselves use. It cannot be included via an external Gradle file :-(
|
// Dependencies needed for what our Gradle scripts themselves use. It cannot be included via an external Gradle file :-(
|
||||||
|
@ -8,6 +8,13 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
gradlePluginPortal()
|
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 {
|
dependencies {
|
||||||
|
@ -20,10 +27,12 @@ buildscript {
|
||||||
|
|
||||||
// SonarQube / Cloud scanning
|
// SonarQube / Cloud scanning
|
||||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8"
|
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8"
|
||||||
|
|
||||||
|
// Our locally included /build-logic
|
||||||
|
classpath("org.terasology.gradology:build-logic")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Needed for extending the "clean" task to also delete custom stuff defined here like natives
|
// Needed for extending the "clean" task to also delete custom stuff defined here like natives
|
||||||
id "base"
|
id "base"
|
||||||
|
@ -39,18 +48,13 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||||
import org.jetbrains.gradle.ext.ActionDelegationConfig
|
import org.jetbrains.gradle.ext.ActionDelegationConfig
|
||||||
|
|
||||||
import java.nio.file.Files
|
import static org.gradle.internal.logging.text.StyledTextOutput.Style
|
||||||
import java.nio.file.Path
|
|
||||||
import java.nio.file.StandardCopyOption
|
|
||||||
|
|
||||||
// Test for right version of Java in use for running this script
|
// Test for right version of Java in use for running this script
|
||||||
assert org.gradle.api.JavaVersion.current().isJava8Compatible()
|
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
|
// Check for Java 8
|
||||||
if(!(JavaVersion.current() == JavaVersion.VERSION_1_8 || JavaVersion.current() == JavaVersion.VERSION_11)) {
|
if(!(JavaVersion.current() == JavaVersion.VERSION_1_8 || JavaVersion.current() == JavaVersion.VERSION_11)) {
|
||||||
def out = services.get(StyledTextOutputFactory).create("an-ouput")
|
def out = services.get(StyledTextOutputFactory).create("an-ouput")
|
||||||
|
|
|
@ -14,8 +14,8 @@ import kotlin.test.fail
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
application
|
application
|
||||||
`terasology-dist`
|
id("terasology-dist")
|
||||||
facade
|
id("facade")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab all the common stuff like plugins to use, artifact repositories, code analysis config
|
// 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
|
import org.terasology.gradology.namedAttribute
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`terasology-repositories`
|
id("terasology-repositories")
|
||||||
`java-platform`
|
`java-platform`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import groovy.io.FileType
|
||||||
|
|
||||||
rootProject.name = 'Terasology'
|
rootProject.name = 'Terasology'
|
||||||
|
|
||||||
|
includeBuild("build-logic")
|
||||||
include 'engine', 'engine-tests', 'facades', 'metas', 'libs', 'modules'
|
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
|
// Handy little snippet found online that'll "fake" having nested settings.gradle files under /modules, /libs, etc
|
||||||
|
|
Loading…
Reference in New Issue