@@ -20,11 +20,7 @@ import org.gradle.api.Project
20
20
import org.gradle.api.file.Directory
21
21
import org.gradle.api.provider.Provider
22
22
import org.gradle.kotlin.dsl.dependencies
23
- import org.gradle.kotlin.dsl.support.unzipTo
24
- import org.gradle.kotlin.dsl.support.zipTo
25
23
import java.io.File
26
- import java.nio.file.Files
27
- import java.nio.file.StandardCopyOption
28
24
import java.util.zip.ZipInputStream
29
25
30
26
val Project .mpsMajorVersion: String get() {
@@ -109,32 +105,6 @@ fun Project.copyMps(): File {
109
105
}
110
106
}
111
107
112
- // Workaround for https://youtrack.jetbrains.com/issue/KT-69541/Kotlin-2.0-compiler-cannot-use-JAR-packaged-as-ZIP64
113
- //
114
- // The issue was first detected with `lib/app.jar` in 2022.2 and 2022.3.
115
- // This JAR is needed since this versions because it contained `com.intellij.openapi.project.ProjectManager`.
116
- // Before that, `lib/platform-api.jar` contained `com.intellij.openapi.project.ProjectManager`.
117
- //
118
- // The workaround is to unzip the JAR with and zip it again.
119
- // Unzipping with Gradle supports ZIP64, but ZIP64 is not used when zipping again.
120
- //
121
- // TODO MODELIX-968 Remove this workaround after it is not needed anymore.
122
- val appJarFile = mpsHomeDir.get().asFile.resolve(" lib/app.jar" )
123
- if (appJarFile.exists()) {
124
- val appJarContent = mpsHomeDir.get().asFile.resolve(" lib/appJarContent" )
125
- val appJarFileNotZip64 = mpsHomeDir.get().asFile.resolve(" lib/appNotZip64.jar" )
126
- println (" Unzipping $appJarFile into $appJarContent " )
127
- unzipTo(appJarContent, appJarFile)
128
- println (" Zipping $appJarContent into $appJarFileNotZip64 " )
129
- zipTo(appJarFileNotZip64, appJarContent)
130
- println (" Deleting $appJarContent " )
131
- delete {
132
- this .delete(appJarContent)
133
- }
134
- println (" Overriding $appJarFile with $appJarFileNotZip64 " )
135
- Files .move(appJarFileNotZip64.toPath(), appJarFile.toPath(), StandardCopyOption .REPLACE_EXISTING )
136
- }
137
-
138
108
// The build number of a local IDE is expected to contain a product code, otherwise an exception is thrown.
139
109
val buildTxt = mpsHomeDir.get().asFile.resolve(" build.txt" )
140
110
val buildNumber = buildTxt.readText()
0 commit comments