Skip to content

Commit 57591dd

Browse files
committed
Merge branch 'dev' into 2025.2
2 parents c3fcf46 + b4c6eca commit 57591dd

291 files changed

Lines changed: 1713 additions & 16366 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
root = true
2+
13
[*.{kt,kts}]
2-
max_line_length=120
3-
ij_kotlin_imports_layout=*
4+
indent_size = 4
5+
indent_style = space
6+
max_line_length = 120
7+
ij_kotlin_imports_layout = *
48
ij_kotlin_name_count_to_use_star_import = 2147483647
59
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
610
insert_final_newline = true

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "templates"]
22
path = templates
3-
branch = v1
3+
branch = v2
44
url = https://github.com/minecraft-dev/templates

buildSrc/src/main/kotlin/mcdev-core.gradle.kts

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* https://mcdev.io/
55
*
6-
* Copyright (C) 2025 minecraft-dev
6+
* Copyright (C) 2026 minecraft-dev
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published
@@ -19,6 +19,7 @@
1919
*/
2020

2121
import org.cadixdev.gradle.licenser.header.HeaderStyle
22+
import org.cadixdev.gradle.licenser.tasks.LicenseTask
2223
import org.gradle.accessors.dm.LibrariesForLibs
2324
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
2425
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
@@ -130,14 +131,58 @@ intellijPlatform {
130131
}
131132

132133
license {
133-
header.set(resources.text.fromFile(rootProject.layout.projectDirectory.file("copyright.txt")))
134+
header.set(resources.text.fromString($$"""
135+
Minecraft Development for IntelliJ
136+
137+
https://mcdev.io/
138+
139+
Copyright (C) ${year} minecraft-dev
140+
141+
This program is free software: you can redistribute it and/or modify
142+
it under the terms of the GNU Lesser General Public License as published
143+
by the Free Software Foundation, version 3.0 only.
144+
145+
This program is distributed in the hope that it will be useful,
146+
but WITHOUT ANY WARRANTY; without even the implied warranty of
147+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
148+
GNU General Public License for more details.
149+
150+
You should have received a copy of the GNU Lesser General Public License
151+
along with this program. If not, see <https://www.gnu.org/licenses/>.
152+
""".trimIndent()))
153+
154+
properties {
155+
set("year", "2026")
156+
}
157+
134158
style["flex"] = HeaderStyle.BLOCK_COMMENT.format
135159
style["bnf"] = HeaderStyle.BLOCK_COMMENT.format
136160

137161
val endings = listOf("java", "kt", "kts", "groovy", "gradle.kts", "xml", "properties", "html", "flex", "bnf")
138162
include(endings.map { "**/*.$it" })
139163
}
140164

165+
tasks.withType(LicenseTask::class).configureEach {
166+
val changedFiles = if (rootProject.ext.has("changedFiles")) {
167+
@Suppress("UNCHECKED_CAST")
168+
rootProject.ext["changedFiles"] as Set<File>
169+
} else {
170+
val unstagedFiles = git("diff", "--name-only").lines()
171+
val stagedFiles = git("diff", "--staged", "--name-only").lines()
172+
var changedFiles = (unstagedFiles + stagedFiles)
173+
.filter { it.isNotBlank() }
174+
.map(project::file)
175+
.toSet()
176+
rootProject.ext["changedFiles"] = changedFiles
177+
changedFiles
178+
}
179+
doFirst {
180+
files = files.filter {
181+
it in changedFiles
182+
}
183+
}
184+
}
185+
141186
idea {
142187
module {
143188
excludeDirs.add(file(intellijPlatform.sandboxContainer.get()))

buildSrc/src/main/kotlin/util.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* https://mcdev.io/
55
*
6-
* Copyright (C) 2025 minecraft-dev
6+
* Copyright (C) 2026 minecraft-dev
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU Lesser General Public License as published
@@ -18,6 +18,10 @@
1818
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1919
*/
2020

21+
import java.io.ByteArrayOutputStream
22+
import java.io.InputStream
23+
import java.io.OutputStream
24+
import java.nio.charset.Charset
2125
import org.gradle.api.Project
2226
import org.gradle.api.tasks.TaskContainer
2327
import org.gradle.api.tasks.util.PatternFilterable
@@ -65,3 +69,11 @@ fun Project.parser(bnf: String, pack: String): TaskDelegate<ParserExec> {
6569
this.grammarKit.setFrom(grammarKit)
6670
}
6771
}
72+
73+
fun Project.git(vararg args: String): String {
74+
val output = providers.exec {
75+
commandLine("git", *args)
76+
isIgnoreExitValue = true
77+
}
78+
return output.standardOutput.asText.get()
79+
}

copyright.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

create_release.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313

1414
from __future__ import annotations
1515
import argparse
16-
import shlex
1716
import subprocess
1817
import sys
1918
from typing import List, Tuple
2019

21-
BRANCHES=["2024.3", "2025.1", "2025.2", "2025.3"]
20+
BRANCHES=["2025.2", "2025.3", "2026.1"]
2221

2322
def check_file_contains_version(path: str, version: str) -> bool:
2423
try:

gradle/wrapper/gradle-wrapper.jar

3.43 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

obfuscation-explorer/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)