Skip to content

Commit 7a585a3

Browse files
committed
Merge branch '2023.1' into 2023.2
2 parents ed21b03 + cfbaebd commit 7a585a3

Some content is hidden

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

48 files changed

+466
-232
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ import org.jlleitschuh.gradle.ktlint.tasks.BaseKtLintCheckTask
2929
import org.jlleitschuh.gradle.ktlint.tasks.KtLintFormatTask
3030

3131
plugins {
32-
kotlin("jvm") version "1.9.0"
32+
kotlin("jvm") version "1.9.20"
3333
java
3434
mcdev
3535
groovy
3636
idea
37-
id("org.jetbrains.intellij") version "1.15.0"
37+
id("org.jetbrains.intellij") version "1.16.0"
3838
id("org.cadixdev.licenser")
3939
id("org.jlleitschuh.gradle.ktlint") version "10.3.0"
4040
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ kotlin.code.style=official
2424
ideaVersion = 2023.2.2
2525
ideaVersionName = 2023.2.2
2626

27-
coreVersion = 1.6.10
27+
coreVersion = 1.6.11
2828
downloadIdeaSources = true
2929

3030
pluginTomlVersion = 232.8660.88

gradle/wrapper/gradle-wrapper.jar

346 Bytes
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-8.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

204-
# Collect all arguments for the java command;
205-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
206-
# shell script including quotes and variable substitutions, so put them in
207-
# double quotes to make sure that they get re-expanded; and
208-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
209210

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Minecraft Development for IntelliJ
3535
</tr>
3636
</table>
3737

38-
Info and Documentation [![Current Release](https://img.shields.io/badge/release-1.6.10-orange.svg?style=flat-square)](https://plugins.jetbrains.com/plugin/8327)
38+
Info and Documentation [![Current Release](https://img.shields.io/badge/release-1.6.11-orange.svg?style=flat-square)](https://plugins.jetbrains.com/plugin/8327)
3939
----------------------
4040

4141
<a href="https://discord.gg/j6UNcfr"><img src="https://i.imgur.com/JXu9C1G.png" height="48px"></img></a>

src/main/kotlin/creator/PlatformVersion.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import com.demonwav.mcdev.update.PluginUtil
2525
import com.demonwav.mcdev.util.fromJson
2626
import com.demonwav.mcdev.util.mapFirstNotNull
2727
import com.demonwav.mcdev.util.withSuppressed
28-
import com.github.kittinunf.fuel.core.FuelError
2928
import com.github.kittinunf.fuel.core.FuelManager
3029
import com.github.kittinunf.fuel.core.requests.suspendable
3130
import com.github.kittinunf.fuel.coroutines.awaitString
@@ -77,11 +76,11 @@ suspend fun <T : Any> getVersionJson(path: String, type: KClass<T>): T {
7776
}
7877

7978
suspend fun getText(path: String): String {
80-
var thrown: FuelError? = null
79+
var thrown: Exception? = null
8180
return URLS.mapFirstNotNull { url ->
8281
try {
8382
doCall(url + path)
84-
} catch (e: FuelError) {
83+
} catch (e: Exception) {
8584
PLATFORM_VERSION_LOGGER.warn("Failed to reach URL $url$path")
8685
thrown = withSuppressed(thrown, e)
8786
null

src/main/kotlin/facet/MinecraftFacet.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class MinecraftFacet(
114114
}
115115

116116
newlyEnabled.forEach(AbstractModule::init)
117+
modules.forEach(AbstractModule::refresh)
117118

118119
ProjectView.getInstance(module.project).refresh()
119120
}

src/main/kotlin/insight/ColorUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private fun <T> findColorFromExpression(
7979
val facet = MinecraftFacet.getInstance(module) ?: return null
8080
val resolvedName = expression.resolvedName ?: return null
8181
for (abstractModuleType in facet.types) {
82-
val map = abstractModuleType.classToColorMappings
82+
val map = abstractModuleType.classToColorMappings(module)
8383
for (entry in map.entries) {
8484
// This is such a hack
8585
// Okay, type will be the fully-qualified class, but it will exclude the actual enum

src/main/kotlin/platform/AbstractModule.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ abstract class AbstractModule(protected val facet: MinecraftFacet) {
9393

9494
open fun init() {}
9595
open fun dispose() {}
96+
open fun refresh() {}
9697
}

0 commit comments

Comments
 (0)