Skip to content

Commit

Permalink
release: version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrueckert committed Dec 6, 2020
2 parents fc7c4e1 + b3a9aa1 commit bbe8527
Show file tree
Hide file tree
Showing 492 changed files with 15,412 additions and 11,185 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/TerasologyPC.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .idea/runConfigurations/TerasologyPC__2nd_client_for_mac.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .idea/runConfigurations/TerasologyPC_for_mac.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 17 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
// Needed due to the Copy Artifact plugin deciding to implement an obnoxious security feature that can't simply be turned off
// Minor housekeeping logic
boolean specialBranch = env.BRANCH_NAME.equals("master") || env.BRANCH_NAME.equals("develop")

// String to use in a property that determines artifact pruning (has to be a String not a number)
String artifactBuildsToKeep = "1"
if (specialBranch) {
artifactBuildsToKeep = "10"
}

properties([
copyArtifactPermission('*')
]);
// Needed due to the Copy Artifact plugin deciding to implement an obnoxious security feature that can't simply be turned off
copyArtifactPermission('*'),
// Flag for Jenkins to discard attached artifacts after x builds
buildDiscarder(logRotator(artifactNumToKeepStr: artifactBuildsToKeep))
])

node ("default-java || heavy-java") {
// Main pipeline definition
node ("heavy-java") {
stage('Checkout') {
echo "Going to check out the things !"
checkout scm
Expand All @@ -15,7 +27,7 @@ node ("default-java || heavy-java") {
archiveArtifacts 'gradlew, gradle/wrapper/*, templates/build.gradle, config/**, facades/PC/build/distributions/Terasology.zip, build/resources/main/org/terasology/version/versionInfo.properties, natives/**, buildSrc/src/**, buildSrc/*.kts'
}
stage('Publish') {
if (env.BRANCH_NAME.equals("master") || env.BRANCH_NAME.equals("develop")) {
if (specialBranch) {
withCredentials([usernamePassword(credentialsId: 'artifactory-gooey', usernameVariable: 'artifactoryUser', passwordVariable: 'artifactoryPass')]) {
sh './gradlew --console=plain -Dorg.gradle.internal.publish.checksums.insecure=true publish -PmavenUser=${artifactoryUser} -PmavenPass=${artifactoryPass}'
}
Expand Down
44 changes: 38 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ plugins {
// Needed for extending the "clean" task to also delete custom stuff defined here like natives
id "base"

// needs for native platform("org.lwjgl") handling.
id "java-platform"

// The root project should not be an eclipse project. It keeps eclipse (4.2) from finding the sub-projects.
//apply plugin: 'eclipse'
id "idea"
Expand All @@ -51,7 +54,7 @@ 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")
out.withStyle(Style.FailureHeader).println("WARNING: Compiling with a JDK not 8 nor 11. While some other Javas may be safe to use any newer than 11 may cause issues. If you encounter oddities try Java 8 or 11. See https://github.com/MovingBlocks/Terasology/issues/3976")
out.withStyle(Style.FailureHeader).println("WARNING: Compiling with a JDK not 8 nor 11. While some other Javas may be safe to use any newer than 11 may cause issues. If you encounter oddities try Java 8 or 11. See https://github.com/MovingBlocks/Terasology/issues/3976. Current detected Java version is ${JavaVersion.current()} from vendor ${System.getProperty("java.vendor")} located at ${System.getProperty("java.home")}")
}

// Declare "extra properties" (variables) for the project (and subs) - a Gradle thing that makes them special.
Expand All @@ -63,7 +66,7 @@ ext {
// Lib dir for use in manifest entries etc (like in :engine). A separate "libsDir" exists, auto-created by Gradle
subDirLibs = 'libs'

LwjglVersion = '2.9.3'
LwjglVersion = '3.2.3'
}

// Declare remote repositories we're interested in - library files will be fetched from here
Expand Down Expand Up @@ -93,19 +96,32 @@ configurations {

dependencies {
// For the "natives" configuration make it depend on the native files from LWJGL
natives group: 'org.lwjgl.lwjgl', name: 'lwjgl', version: LwjglVersion
natives platform("org.lwjgl:lwjgl-bom:$LwjglVersion")
["natives-linux","natives-windows","natives-macos"].forEach {
natives "org.lwjgl:lwjgl::$it"
natives "org.lwjgl:lwjgl-assimp::$it"
natives "org.lwjgl:lwjgl-glfw::$it"
natives "org.lwjgl:lwjgl-openal::$it"
natives "org.lwjgl:lwjgl-opengl::$it"
natives "org.lwjgl:lwjgl-stb::$it"
}


// Config for our code analytics lives in a centralized repo: https://github.com/MovingBlocks/TeraConfig
codeMetrics group: 'org.terasology.config', name: 'codemetrics', version: '1.3.2', ext: 'zip'

// Natives for JNLua (Kallisti, KComputers)
natives group: 'org.terasology.jnlua', name: 'jnlua_natives', version: '0.1.0-SNAPSHOT', ext: 'zip'

// Natives for JNBullet
natives group: 'org.terasology.jnbullet', name: 'JNBullet', version: '1.0.2', ext: 'zip'

}

task extractWindowsNatives(type: Copy) {
description = "Extracts the Windows natives from the downloaded zip"
from {
configurations.natives.collect { it.getName().contains('-natives-window') ? zipTree(it) : [] }
configurations.natives.collect { it.getName().contains('natives-windows') ? zipTree(it) : [] }
}
into("$dirNatives/windows")
exclude('META-INF/**')
Expand All @@ -114,7 +130,7 @@ task extractWindowsNatives(type: Copy) {
task extractMacOSXNatives(type: Copy) {
description = "Extracts the OSX natives from the downloaded zip"
from {
configurations.natives.collect { it.getName().contains('-natives-osx') ? zipTree(it) : [] }
configurations.natives.collect { it.getName().contains('natives-macos') ? zipTree(it) : [] }
}
into("$dirNatives/macosx")
exclude('META-INF/**')
Expand All @@ -123,7 +139,7 @@ task extractMacOSXNatives(type: Copy) {
task extractLinuxNatives(type: Copy) {
description = "Extracts the Linux natives from the downloaded zip"
from {
configurations.natives.collect { it.getName().contains('-natives-linux') ? zipTree(it) : [] }
configurations.natives.collect { it.getName().contains('natives-linux') ? zipTree(it) : [] }
}
into("$dirNatives/linux")
exclude('META-INF/**')
Expand All @@ -137,12 +153,22 @@ task extractJNLuaNatives(type: Copy) {
into("$dirNatives")
}

task extractNativeBulletNatives(type:Copy) {
description = "Extracts the JNBullet natives from the downloaded zip"
from {
configurations.natives.collect { it.getName().contains('JNBullet') ? zipTree(it) : [] }
}
into ("$dirNatives")
}


task extractNatives {
description = "Extracts all the native lwjgl libraries from the downloaded zip"
dependsOn extractWindowsNatives
dependsOn extractLinuxNatives
dependsOn extractMacOSXNatives
dependsOn extractJNLuaNatives
dependsOn extractNativeBulletNatives
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -290,6 +316,12 @@ class RemoteModuleGatherer implements DependencyResolutionListener {
gradle.addListener(new RemoteModuleGatherer(rootDir.toPath().resolve("modules")))


tasks.named('wrapper') {
// ALL distributionType because IntelliJ prefers having its sources for analysis and reference.
distributionType = Wrapper.DistributionType.ALL
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// General IDE customization //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
19 changes: 4 additions & 15 deletions buildSrc/src/main/kotlin/terasology-module.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Copyright 2020 MovingBlocks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

// Simple build file for modules - the one under the Core module is the template, will be copied as needed to modules

Expand Down Expand Up @@ -174,6 +161,8 @@ tasks.register("cacheReflections") {
outputs.file(File(mainSourceSet.output.classesDirs.first(), "reflections.cache"))
dependsOn(tasks.named("classes"))

outputs.upToDateWhen { tasks.named("classes").get().state.upToDate }

doFirst {
try {
val reflections = Reflections(ConfigurationBuilder()
Expand Down
Loading

0 comments on commit bbe8527

Please sign in to comment.