|
1 | | -import org.gradle.kotlin.dsl.support.unzipTo |
2 | | -import org.gradle.kotlin.dsl.support.zipTo |
3 | 1 | import org.jetbrains.kotlin.gradle.dsl.JvmTarget |
4 | 2 | import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension |
5 | 3 | import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension |
6 | 4 | import org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper |
7 | 5 | import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformJvmPlugin |
8 | | -import java.nio.file.Files |
9 | | -import java.nio.file.StandardCopyOption |
10 | 6 | import java.util.zip.ZipInputStream |
11 | 7 |
|
12 | 8 | buildscript { |
@@ -195,32 +191,6 @@ mpsHome.get().asFile.let { baseDir -> |
195 | 191 | } |
196 | 192 | } |
197 | 193 |
|
198 | | - // Workaround for https://youtrack.jetbrains.com/issue/KT-69541/Kotlin-2.0-compiler-cannot-use-JAR-packaged-as-ZIP64 |
199 | | - // |
200 | | - // The issue was first detected with `lib/app.jar` in 2022.2 and 2022.3. |
201 | | - // This JAR is needed since this versions because it contained `com.intellij.openapi.project.ProjectManager`. |
202 | | - // Before that, `lib/platform-api.jar` contained `com.intellij.openapi.project.ProjectManager`. |
203 | | - // |
204 | | - // The workaround is to unzip the JAR with and zip it again. |
205 | | - // Unzipping with Gradle supports ZIP64, but ZIP64 is not used when zipping again. |
206 | | - // |
207 | | - // TODO MODELIX-968 Remove this workaround after it is not needed anymore. |
208 | | - val appJarFile = mpsHome.get().asFile.resolve("lib/app.jar") |
209 | | - if (appJarFile.exists()) { |
210 | | - val appJarContent = mpsHome.get().asFile.resolve("lib/appJarContent") |
211 | | - val appJarFileNotZip64 = mpsHome.get().asFile.resolve("lib/appNotZip64.jar") |
212 | | - println("Unzipping $appJarFile into $appJarContent") |
213 | | - unzipTo(appJarContent, appJarFile) |
214 | | - println("Zipping $appJarContent into $appJarFileNotZip64") |
215 | | - zipTo(appJarFileNotZip64, appJarContent) |
216 | | - println("Deleting $appJarContent") |
217 | | - delete { |
218 | | - this.delete(appJarContent) |
219 | | - } |
220 | | - println("Overriding $appJarFile with $appJarFileNotZip64") |
221 | | - Files.move(appJarFileNotZip64.toPath(), appJarFile.toPath(), StandardCopyOption.REPLACE_EXISTING) |
222 | | - } |
223 | | - |
224 | 194 | // The build number of a local IDE is expected to contain a product code, otherwise an exception is thrown. |
225 | 195 | val buildTxt = mpsHome.get().asFile.resolve("build.txt") |
226 | 196 | val buildNumber = buildTxt.readText() |
|
0 commit comments