Skip to content

Commit

Permalink
fix: fix some compatibility errors
Browse files Browse the repository at this point in the history
Upgrade Gradle version to 8.1.1
Upgrade Kotlin version to 1.8.22
Upgrade Java version to 17
Migrate build.gradle to build.gradle.kts
  • Loading branch information
liying2008 committed Jul 29, 2023
1 parent 8dfc49a commit 0b6b6dc
Show file tree
Hide file tree
Showing 17 changed files with 318 additions and 206 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
local.properties
build/
out/
.run/Publish Plugin.run.xml
25 changes: 25 additions & 0 deletions .run/Run IDE with Plugin.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--stacktrace" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@

## Contact Me

CSDN:[http://blog.csdn.net/u012939909](http://blog.csdn.net/u012939909)
Email:[[email protected]](mailto:[email protected])
Email:[[email protected]](mailto:[email protected])
57 changes: 0 additions & 57 deletions build.gradle

This file was deleted.

50 changes: 50 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.8.22"
id("org.jetbrains.intellij") version "1.14.1"
}

group = "cc.duduhuo"
version = "1.0.5"

repositories {
maven(url = "https://maven.aliyun.com/repository/public")
maven(url = "https://maven.aliyun.com/repository/gradle-plugin")
mavenCentral()
}

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version.set("2022.2.5")
// version.set("2023.2")
pluginName.set("git-conflict")
}

tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}

patchPluginXml {
// please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description
sinceBuild.set("222")
untilBuild.set("")
pluginDescription.set(file("description.html").readText())
changeNotes.set(file("changeNotes.html").readText())
}

signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}

publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
}
4 changes: 4 additions & 0 deletions changeNotes.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<h3>v1.0.5</h3><br>
<li>Fix compatibility errors.</li>
<br>

<h3>v1.0.4</h3><br>
<li>Fix compatibility errors.</li>
<br>
Expand Down
9 changes: 8 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
kotlin.code.style=official
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency=false
# TODO temporary workaround for Kotlin 1.8.20+ (https://jb.gg/intellij-platform-kotlin-oom)
kotlin.incremental.useClasspathSnapshot=false
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.configuration-cache=true
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
11 changes: 5 additions & 6 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri May 29 20:54:05 CST 2020
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0b6b6dc

Please sign in to comment.