Skip to content

Commit c0b9a86

Browse files
committed
Remove Canary support
1 parent 6993a4a commit c0b9a86

Some content is hidden

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

43 files changed

+21
-1535
lines changed

readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Issues
8282
------
8383

8484
We have a few ambiguous labels on the issues page, so here are their definitions:
85-
* `platform: all` - An issue which applies to all supported platforms (`Bukkit`, `Sponge`, `BungeeCord`, `Forge`, `LiteLoader`, and `Canary`)
85+
* `platform: all` - An issue which applies to all supported platforms (`Bukkit`, `Sponge`, `BungeeCord`, `Forge`, `LiteLoader`)
8686
* `platform: main` - Multiple platforms, containing at least `Bukkit`, `Sponge`, and `Forge`. It can contain either of the other two as
8787
well, as long as it doesn't contain all of them. In that case, `platform: all` would be more appropriate, of course.
8888
* `platform: multi` - Any issue with more than two platforms which doesn't fall under the first two categories.
@@ -102,4 +102,3 @@ Supported Platforms
102102
- [![MCP Icon](src/main/resources/assets/icons/platform/MCP.png?raw=true) **MCP**](http://www.modcoderpack.com/)
103103
- [![Mixins Icon](src/main/resources/assets/icons/platform/Mixins_dark.png?raw=true) **Mixins**](https://github.com/SpongePowered/Mixin)
104104
- [![BungeeCord Icon](src/main/resources/assets/icons/platform/BungeeCord.png?raw=true) **BungeeCord**](https://www.spigotmc.org/wiki/bungeecord/) ([![Waterfall Icon](src/main/resources/assets/icons/platform/Waterfall.png?raw=true) Waterfall](https://github.com/WaterfallMC))
105-
- [![Canary Icon](src/main/resources/assets/icons/platform/Canary.png?raw=true) **Canary**](https://canarymod.net/) ([![Neptune Icon](src/main/resources/assets/icons/platform/Neptune.png?raw=true) **Neptune**](https://www.neptunepowered.org/))

src/main/kotlin/com/demonwav/mcdev/asset/PlatformAssets.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ object PlatformAssets : Assets() {
4848
val MIXIN_ICON_DARK = loadIcon("/assets/icons/platform/Mixins_dark.png")
4949
val MIXIN_ICON_2X_DARK = loadIcon("/assets/icons/platform/Mixins@2x_dark.png")
5050

51-
val CANARY_ICON = loadIcon("/assets/icons/platform/Canary.png")
52-
val CANARY_ICON_2X = loadIcon("/assets/icons/platform/Canary@2x.png")
53-
val NEPTUNE_ICON = loadIcon("/assets/icons/platform/Neptune.png")
54-
val NEPTUNE_ICON_2X = loadIcon("/assets/icons/platform/Neptune@2x.png")
55-
5651
val MCP_ICON = loadIcon("/assets/icons/platform/MCP.png")
5752
val MCP_ICON_2X = loadIcon("/assets/icons/platform/MCP@2x.png")
5853
val MCP_ICON_DARK = loadIcon("/assets/icons/platform/MCP_dark.png")

src/main/kotlin/com/demonwav/mcdev/buildsystem/gradle/GradleBuildSystem.kt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import com.demonwav.mcdev.util.runWriteTask
2828
import com.demonwav.mcdev.util.runWriteTaskLater
2929
import com.intellij.codeInsight.actions.ReformatCodeProcessor
3030
import com.intellij.execution.RunManager
31-
import com.intellij.execution.impl.RunManagerImpl
32-
import com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl
3331
import com.intellij.ide.actions.ImportModuleAction
3432
import com.intellij.ide.util.newProjectWizard.AddModuleWizard
3533
import com.intellij.openapi.components.ServiceManager
@@ -64,7 +62,7 @@ import java.io.File
6462

6563
class GradleBuildSystem : BuildSystem() {
6664

67-
var buildGradle: VirtualFile? = null
65+
private var buildGradle: VirtualFile? = null
6866

6967
override fun create(project: Project, configuration: ProjectConfiguration, indicator: ProgressIndicator) {
7068
rootDirectory.refresh(false, true)
@@ -169,19 +167,17 @@ class GradleBuildSystem : BuildSystem() {
169167
val connection = connector.connect()
170168
val launcher = connection.newBuild()
171169

172-
try {
170+
connection.use {
173171
val sdkPair = ExternalSystemJdkUtil.getAvailableJdk(project)
174172
if (sdkPair.second?.homePath != null && ExternalSystemJdkUtil.USE_INTERNAL_JAVA != sdkPair.first) {
175173
launcher.setJavaHome(File(sdkPair.second.homePath))
176174
}
177175

178-
launcher.addProgressListener(ProgressListener {
179-
indicator.text = it.description
176+
launcher.addProgressListener(ProgressListener { event ->
177+
indicator.text = event.description
180178
})
181179
func(launcher)
182180
launcher.run()
183-
} finally {
184-
connection.close()
185181
}
186182
}
187183

@@ -363,7 +359,7 @@ class GradleBuildSystem : BuildSystem() {
363359
BaseTemplate.applySettingsGradleTemplate(project, settingsGradle, artifactIdLower, includes)
364360

365361
// Common will be empty, it's for the developers to fill in with common classes
366-
val common = rootDirectory.createChildDirectory(this, artifactIdLower + "-common")
362+
val common = rootDirectory.createChildDirectory(this, "$artifactIdLower-common")
367363
createDirectories(common)
368364
}
369365

@@ -388,7 +384,7 @@ class GradleBuildSystem : BuildSystem() {
388384

389385
// For each build system we initialize it, but not the same as a normal create. We need to know the common project name,
390386
// as we automatically add it as a dependency too
391-
gradleBuildSystem.createSubModule(project, configuration, artifactIdLower + "-common", indicator)
387+
gradleBuildSystem.createSubModule(project, configuration, "$artifactIdLower-common", indicator)
392388
map.putIfAbsent(gradleBuildSystem, configuration)
393389
}
394390

src/main/kotlin/com/demonwav/mcdev/buildsystem/maven/MavenBuildSystem.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import com.demonwav.mcdev.platform.PlatformType
1515
import com.demonwav.mcdev.platform.ProjectConfiguration
1616
import com.demonwav.mcdev.platform.bukkit.BukkitTemplate
1717
import com.demonwav.mcdev.platform.bungeecord.BungeeCordTemplate
18-
import com.demonwav.mcdev.platform.canary.CanaryTemplate
1918
import com.demonwav.mcdev.platform.sponge.SpongeTemplate
2019
import com.demonwav.mcdev.util.runWriteAction
2120
import com.demonwav.mcdev.util.runWriteTask
@@ -50,8 +49,6 @@ class MavenBuildSystem : BuildSystem() {
5049
BukkitTemplate.applyPomTemplate(project, buildVersion)
5150
PlatformType.BUNGEECORD, PlatformType.WATERFALL -> BungeeCordTemplate.applyPomTemplate(project, buildVersion)
5251
PlatformType.SPONGE -> SpongeTemplate.applyPomTemplate(project, buildVersion)
53-
PlatformType.CANARY, PlatformType.NEPTUNE ->
54-
CanaryTemplate.applyPomTemplate(project, buildVersion)
5552
else -> return@runWriteTask
5653
}
5754

src/main/kotlin/com/demonwav/mcdev/creator/BuildSystemWizardStep.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class BuildSystemWizardStep(private val creator: MinecraftProjectCreator) : Modu
4949
buildSystemBox.selectedIndex = 1
5050
buildSystemBox.setVisible(false)
5151
} else if (creator.settings.values
52-
.any { s -> s.type === PlatformType.SPONGE || s.type === PlatformType.CANARY || s.type === PlatformType.NEPTUNE }) {
52+
.any { s -> s.type === PlatformType.SPONGE }) {
5353
buildSystemBox.selectedIndex = 1
5454
buildSystemBox.setVisible(true)
5555
} else {

src/main/kotlin/com/demonwav/mcdev/creator/CanaryProjectSettingsWizard.form

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

0 commit comments

Comments
 (0)