Skip to content

Commit

Permalink
release: version v4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skaldarnar committed Mar 20, 2021
2 parents 220c52d + e0af2a1 commit 0fa1272
Show file tree
Hide file tree
Showing 3,154 changed files with 46,651 additions and 57,553 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
41 changes: 41 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name-template: 'Draft for v$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
change-template: '- #$NUMBER $TITLE (@$AUTHOR)'
template: |
## Changes
$CHANGES
categories:
- title: ':rocket: Features'
labels:
- 'Enhancement'
- title: ':bug: Bug Fixes'
labels:
- 'Bug'
- title: ':toolbox: Maintenance'
labels:
- 'Stabilization'
- title: ':books: Documentation'
labels:
- 'Documentation'
- title: ':gear: Logistics'
labels:
- 'Logistics'
autolabeler:
- label: 'Documentation'
title:
- '/doc/i'
- label: 'Bug'
title:
- '/fix/i'
- label: 'Enhancement'
title:
- '/feat/i'
- label: 'Logistics'
title:
- '/build/i'
- '/ci/i'
- label: 'Stabilization'
title:
- '/chore/i'
- '/refactor/i'
18 changes: 18 additions & 0 deletions .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release Draft

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- develop

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter-config.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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/runConfigurations/TerasologyPC.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__2nd_client_.xml

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

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__3rd_client_.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__CR_enabled_.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__EXTREME_8GB_.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__Headless_.xml

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

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__Splash_disabled_.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__load_latest_.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__no_audio_.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__no_saves_.xml

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

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_for_mac.xml

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

4 changes: 2 additions & 2 deletions .idea/runConfigurations/engine_tests_with_JaCoCo.xml

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

2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ node ("heavy-java") {
stage('Build') {
// Jenkins sometimes doesn't run Gradle automatically in plain console mode, so make it explicit
sh './gradlew --console=plain clean extractConfig extractNatives distForLauncher testDist'
archiveArtifacts 'gradlew, gradle/wrapper/*, templates/build.gradle, config/**, facades/PC/build/distributions/Terasology.zip, engine/build/resources/main/org/terasology/version/versionInfo.properties, natives/**, buildSrc/src/**, buildSrc/*.kts'
archiveArtifacts 'gradlew, gradle/wrapper/*, templates/build.gradle, config/**, facades/PC/build/distributions/Terasology.zip, engine/build/resources/main/org/terasology/version/versionInfo.properties, natives/**, build-logic/src/**, build-logic/*.kts'
}
stage('Publish') {
if (specialBranch) {
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion buildSrc/build.gradle.kts → build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ repositories {

dependencies {
// Needed for caching reflected data during builds
implementation("org.reflections:reflections:0.9.10")
implementation("org.terasology:reflections:0.9.12-MB")
implementation("dom4j:dom4j:1.6.1")

// for inspecting modules
implementation("org.terasology:gestalt-module:5.1.5")

api(kotlin("test"))
}

group = "org.terasology.gradology"
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ package org.terasology.gradology

const val TERASOLOGY_MODULES_GROUP = "org.terasology.modules"
const val ENGINE_MODULE_NAME = "engine"

const val MODULE_INFO_FILENAME = "module.txt"
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.gradology

import org.gradle.api.Project
import org.terasology.module.DependencyInfo
import org.terasology.module.ModuleMetadata
import org.terasology.module.ModuleMetadataJsonAdapter
import org.terasology.naming.Version
import java.io.File


// This might be a gradle ExternalModuleDependency or ModuleComponentSelector
// or something else from gradle.api.artifacts, but it exposes no concrete implementation
// of those interfaces.
data class GradleDependencyInfo(val group: String, val module: String, val version: String) {
fun asMap(): Map<String, String> {
return mapOf("group" to group, "name" to module, "version" to version)
}
}


class ModuleMetadataForGradle(private val moduleConfig: ModuleMetadata) {

companion object {
fun fromFile(moduleFile: File, project: Project?): ModuleMetadataForGradle {
val moduleConfig = try {
moduleFile.reader().use {
ModuleMetadataJsonAdapter().read(it)!!
}
} catch (e: Exception) {
throw ModuleInfoException(e, moduleFile, project)
}

return ModuleMetadataForGradle(moduleConfig)
}

fun forProject(project: Project): ModuleMetadataForGradle {
return fromFile(project.file(MODULE_INFO_FILENAME), project)
}
}

val version: Version
get() = moduleConfig.version

val group: String = TERASOLOGY_MODULES_GROUP

fun engineVersion(): String {
return moduleConfig.dependencies.filterNotNull()
.find { it.id.toString() == ENGINE_MODULE_NAME }
?.versionRange()?.toString() ?: "+"
}

/**
* Dependencies declared by this module's metadata.
*
* @return a list of modules and whether each is optional
*/
fun moduleDependencies(): List<Pair<GradleDependencyInfo, Boolean>> {
val gestaltDeps = moduleConfig.dependencies.filterNotNull().filterNot { it.id.toString() == "engine" }
return gestaltDeps.map { gradleModule(it) }
}

private fun gradleModule(gestaltDependency: DependencyInfo): Pair<GradleDependencyInfo, Boolean> {
if (!gestaltDependency.minVersion.isSnapshot) {
// gestalt considers snapshots to satisfy a minimum requirement:
// https://github.com/MovingBlocks/gestalt/blob/fe1893821127/gestalt-module/src/main/java/org/terasology/naming/VersionRange.java#L58-L59
gestaltDependency.minVersion = gestaltDependency.minVersion.snapshot
// (maybe there's some way to do that with a custom gradle resolver?
// but making a resolver that only works that way on gestalt modules specifically
// sounds complicated.)
}

val gradleDep = GradleDependencyInfo(TERASOLOGY_MODULES_GROUP, gestaltDependency.id.toString(), gestaltDependency.versionRange().toString())
return Pair(gradleDep, gestaltDependency.isOptional)
}
}
Loading

0 comments on commit 0fa1272

Please sign in to comment.