[Build] Update dependencies
Fix some reports from "Show Vulnerable Dependencies" ^KTI-1342
This commit is contained in:
committed by
Space Team
parent
62a6bb1a31
commit
dbb5072a26
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.android.tests;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
import com.google.common.base.StandardSystemProperty;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import junit.framework.TestSuite;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -24,6 +24,10 @@ import org.junit.runner.RunWith;
|
||||
import org.junit.runners.AllTests;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Objects;
|
||||
|
||||
@RunWith(AllTests.class)
|
||||
public class AndroidRunner {
|
||||
@@ -31,9 +35,11 @@ public class AndroidRunner {
|
||||
private static PathManager pathManager;
|
||||
|
||||
@NotNull
|
||||
public static PathManager getPathManager() {
|
||||
public static PathManager getPathManager() throws IOException {
|
||||
if (pathManager == null) {
|
||||
File tmpFolder = Files.createTempDir();
|
||||
File tmpFolder =
|
||||
Files.createTempDirectory(Paths.get(Objects.requireNonNull(StandardSystemProperty.JAVA_IO_TMPDIR.value())), null)
|
||||
.toFile();
|
||||
System.out.println("Created temporary folder for running android tests: " + tmpFolder.getAbsolutePath());
|
||||
File rootFolder = new File("");
|
||||
pathManager = new PathManager(rootFolder.getAbsolutePath(), tmpFolder.getAbsolutePath());
|
||||
@@ -54,5 +60,4 @@ public class AndroidRunner {
|
||||
// Clear tmp folder where we run android tests
|
||||
FileUtil.delete(new File(pathManager.getTmpFolder()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ kotlinx-serialization = "1.5.0"
|
||||
shadow = "8.1.1" # Should be in sync with version in kotlin-native/
|
||||
spdx = "0.1.0-dev-10"
|
||||
proguard = "6.2.2"
|
||||
ktor = "2.0.2" # should be in sync with versions.properties
|
||||
ktor = "2.3.3"
|
||||
kotlinx-metadataJvm = "0.6.2"
|
||||
# Forcing gson version because of https://github.com/google/gson/pull/1991
|
||||
gson = { strictly = "2.8.9" } # should be in sync with version.properties
|
||||
@@ -30,10 +30,18 @@ kotlinx-metadataJvm = { module = "org.jetbrains.kotlinx:kotlinx-metadata-jvm", v
|
||||
shadow-gradlePlugin = { module = "com.github.johnrengelman:shadow", version.ref = "shadow" }
|
||||
spdx-gradlePlugin = { module = "org.spdx:spdx-gradle-plugin", version.ref = "spdx" }
|
||||
proguard-gradlePlugin = { module = "net.sf.proguard:proguard-gradle", version.ref = "proguard" }
|
||||
|
||||
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
|
||||
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
|
||||
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
|
||||
ktor-client-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" }
|
||||
ktor-client-websockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" }
|
||||
ktor-server-core = { module = "io.ktor:ktor-server-core", version.ref = "ktor" }
|
||||
ktor-server-netty = { module = "io.ktor:ktor-server-netty", version.ref = "ktor" }
|
||||
ktor-server-test-host = { module = "io.ktor:ktor-server-test-host", version.ref = "ktor" }
|
||||
|
||||
ktor-serialization-jackson = { module = "io.ktor:ktor-serialization-jackson", version.ref = "ktor" }
|
||||
jackson-dataformat-xml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-xml", version.ref = "jackson" }
|
||||
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
|
||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||
jetbrains-ideaExt-gradlePlugin = { module = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext", version.ref = "jetbrains-ideaExt" }
|
||||
|
||||
+364
-526
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ versions.groovy-xml=2.5.11
|
||||
versions.groovy=2.5.11
|
||||
# should be in sync with libs.versions.toml
|
||||
versions.gson=2.8.9
|
||||
versions.guava=29.0-jre
|
||||
versions.guava=32.0.1-jre
|
||||
versions.intellij-deps-fastutil=8.5.4-9
|
||||
versions.jdom=2.0.6
|
||||
versions.jna-platform=5.9.0.26
|
||||
@@ -48,16 +48,6 @@ versions.kotlinx-coroutines-core=1.5.0
|
||||
versions.kotlinx-metadata-jvm=0.6.2
|
||||
versions.kotlinx-metadata-klib=0.0.1-dev-10
|
||||
versions.kotlinx-serialization-json=1.3.3
|
||||
# Ktor's versions should be in sync with libs.versions.toml
|
||||
versions.ktor-network=2.0.2
|
||||
versions.ktor-utils=2.0.2
|
||||
versions.ktor-server-test-host=2.0.2
|
||||
versions.ktor-server-core=2.0.2
|
||||
versions.ktor-server-netty=2.0.2
|
||||
versions.ktor-client-mock=2.0.2
|
||||
versions.ktor-client-core=2.0.2
|
||||
versions.ktor-client-cio=2.0.2
|
||||
versions.ktor-client-websockets=2.0.2
|
||||
versions.native-platform=0.14
|
||||
versions.protobuf-relocated=2.6.1-1
|
||||
versions.r8=2.2.64
|
||||
|
||||
@@ -82,9 +82,9 @@ dependencies {
|
||||
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${commonDependencyVersion("org.junit", "junit-bom")}")
|
||||
|
||||
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-serialization-json"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-core"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-cio"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-websockets"))
|
||||
testImplementation(libs.ktor.client.cio)
|
||||
testImplementation(libs.ktor.client.core)
|
||||
testImplementation(libs.ktor.client.websockets)
|
||||
}
|
||||
|
||||
val generationRoot = projectDir.resolve("tests-gen")
|
||||
|
||||
+4
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.backend.konan
|
||||
|
||||
import com.google.common.io.Files
|
||||
import com.google.common.base.StandardSystemProperty
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.backend.common.linkage.issues.UserVisibleIrModulesSupport
|
||||
import org.jetbrains.kotlin.backend.konan.serialization.KonanUserVisibleIrModulesSupport
|
||||
@@ -22,6 +22,8 @@ import org.jetbrains.kotlin.konan.util.KonanHomeProvider
|
||||
import org.jetbrains.kotlin.konan.util.visibleName
|
||||
import org.jetbrains.kotlin.library.metadata.resolver.TopologicalLibraryOrder
|
||||
import org.jetbrains.kotlin.util.removeSuffixIfPresent
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
|
||||
enum class IrVerificationMode {
|
||||
NONE,
|
||||
@@ -547,7 +549,7 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
|
||||
internal val saveLlvmIrDirectory: java.io.File by lazy {
|
||||
val path = configuration.get(KonanConfigKeys.SAVE_LLVM_IR_DIRECTORY)
|
||||
if (path == null) {
|
||||
val tempDir = Files.createTempDir()
|
||||
val tempDir = Files.createTempDirectory(Paths.get(StandardSystemProperty.JAVA_IO_TMPDIR.value()!!), /* prefix= */ null).toFile()
|
||||
configuration.report(CompilerMessageSeverity.WARNING,
|
||||
"Temporary directory for LLVM IR is ${tempDir.canonicalPath}")
|
||||
tempDir
|
||||
|
||||
@@ -85,11 +85,11 @@ dependencies {
|
||||
testImplementation(kotlinStdlib("jdk8"))
|
||||
testImplementation(project(":kotlin-parcelize-compiler"))
|
||||
testImplementation(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-test-host"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-core"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-cio"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-netty"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-mock"))
|
||||
testImplementation(libs.ktor.client.cio)
|
||||
testImplementation(libs.ktor.client.mock)
|
||||
testImplementation(libs.ktor.server.core)
|
||||
testImplementation(libs.ktor.server.netty)
|
||||
testImplementation(libs.ktor.server.test.host)
|
||||
|
||||
testImplementation(gradleApi())
|
||||
testImplementation(gradleTestKit())
|
||||
|
||||
@@ -3,8 +3,9 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("io.ktor:ktor-client-cio:1.4.0")
|
||||
implementation(commonDependency("com.google.code.gson:gson"))
|
||||
implementation(kotlinStdlib("jdk8"))
|
||||
implementation(libs.ktor.client.cio)
|
||||
implementation(libs.gson)
|
||||
implementation("org.apache.velocity:velocity:1.7")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0")
|
||||
}
|
||||
|
||||
+6
-4
@@ -8,14 +8,16 @@ package org.jetbrains.kotlin.generators.gradle.targets.js
|
||||
data class Package(
|
||||
val name: String,
|
||||
val version: String,
|
||||
val displayName: String
|
||||
val displayName: String,
|
||||
) {
|
||||
// Used in velocity template
|
||||
@Suppress("unused")
|
||||
fun camelize(): String =
|
||||
displayName
|
||||
.split("-")
|
||||
.mapIndexed { index, item -> if (index == 0) item else item.capitalize() }
|
||||
.mapIndexed { index, item ->
|
||||
if (index == 0) item else item.replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }
|
||||
}
|
||||
.joinToString("")
|
||||
}
|
||||
|
||||
@@ -28,13 +30,13 @@ sealed class PackageInformation {
|
||||
data class RealPackageInformation(
|
||||
override val name: String,
|
||||
override val versions: Set<String>,
|
||||
override val displayName: String = name
|
||||
override val displayName: String = name,
|
||||
) : PackageInformation()
|
||||
|
||||
data class HardcodedPackageInformation(
|
||||
override val name: String,
|
||||
val version: String,
|
||||
override val displayName: String = name
|
||||
override val displayName: String = name,
|
||||
) : PackageInformation() {
|
||||
override val versions: Set<String> = setOf(version)
|
||||
}
|
||||
+2
-1
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.generators.gradle.targets.js
|
||||
import com.google.gson.Gson
|
||||
import io.ktor.client.*
|
||||
import io.ktor.client.request.*
|
||||
import io.ktor.client.statement.*
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import java.io.UnsupportedEncodingException
|
||||
@@ -65,7 +66,7 @@ class VersionFetcher : AutoCloseable {
|
||||
else
|
||||
encodeURIComponent(packageName)
|
||||
|
||||
return client.get("http://registry.npmjs.org/$packagePath")
|
||||
return client.get("http://registry.npmjs.org/$packagePath").bodyAsText()
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
|
||||
@@ -7,9 +7,9 @@ dependencies {
|
||||
testImplementation(intellijCore())
|
||||
testImplementation(projectTests(":compiler:tests-common"))
|
||||
|
||||
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.7")
|
||||
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.7")
|
||||
testImplementation("com.fasterxml.woodstox:woodstox-core:6.2.4")
|
||||
testImplementation(libs.jackson.dataformat.xml)
|
||||
testImplementation(libs.jackson.module.kotlin)
|
||||
testImplementation("com.fasterxml.woodstox:woodstox-core:6.5.1")
|
||||
|
||||
testImplementation("org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user