diff --git a/build.gradle.kts b/build.gradle.kts index b59de78..b164301 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("java") - id("org.jetbrains.kotlin.jvm") version "1.9.25" + id("org.jetbrains.kotlin.jvm") version "1.9.22" id("org.jetbrains.intellij") version "1.17.4" } diff --git a/gradle.properties b/gradle.properties index 24630b3..65247ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,3 +4,11 @@ kotlin.stdlib.default.dependency=false org.gradle.configuration-cache=true # Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html org.gradle.caching=true +org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home + + +systemProp.http.proxyHost=127.0.0.1 +systemProp.http.proxyPort=7890 +systemProp.https.proxyHost=127.0.0.1 +systemProp.https.proxyPort=7890 + \ No newline at end of file diff --git a/path/to/LatestVersionResolver.kt b/path/to/LatestVersionResolver.kt deleted file mode 100644 index e2e860f..0000000 --- a/path/to/LatestVersionResolver.kt +++ /dev/null @@ -1,6 +0,0 @@ -val location: String? = connection.getHeaderField("Location") -if (location == null) { - // 处理 Location 为 null 的情况,例如抛出异常或返回默认值 - throw IOException("Location header is missing in the response") -} -// 原有逻辑 \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 688213b..7063cbc 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,6 +3,14 @@ pluginManagement { mavenCentral() gradlePluginPortal() } + resolutionStrategy { + eachPlugin { + if (requested.id.namespace == "org.jetbrains.intellij") { + useVersion("1.17.4") + } + } + } } + rootProject.name = "maven-aggregation" \ No newline at end of file diff --git a/关于构建当前项目的一些步骤.md b/关于构建当前项目的一些步骤.md new file mode 100644 index 0000000..ac1a851 --- /dev/null +++ b/关于构建当前项目的一些步骤.md @@ -0,0 +1,22 @@ + + +本地最好是需要删除 Gradle 缓存才能重新构建项目。以下是删除 Gradle 缓存的步骤 + +# 1. 停止所有 Gradle 进程 +./gradlew --stop + +# 2. 删除缓存目录(确保路径正确) +rm -rf /Users/wandong/.gradle/caches/ + +# 3. 删除本地配置缓存(如果存在) +rm -rf .gradle/configuration-cache/ + +# 4. 清理项目构建文件(可选) +rm -rf build/ .gradle/ + +# 5. 使用禁用配置缓存的方式重新构建 +./gradlew build --no-configuration-cache + + +总结: +第5步构建的时候最好使用魔法上网(VPN)来解决一些构建的问题