Skip to content

Commit 06d3834

Browse files
committed
Sync function
1 parent 4fafce4 commit 06d3834

File tree

215 files changed

+8258
-3188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+8258
-3188
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,45 @@ jobs:
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v2
20-
20+
2121
- name: Set LD_VERSION
2222
if: ${{ github.event_name == 'push'}}
2323
run: echo "LD_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
2424
- name: Set LD_VERSION
2525
if: ${{ github.event_name == 'workflow_dispatch'}}
2626
run: echo "LD_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
27-
27+
- name: Set PUBLISH_TOKEN
28+
run: echo "PUBLISH_TOKEN=${{ secrets.PUBLISH_TOKEN }}" >> $GITHUB_ENV
29+
2830
- name: Set up JDK 11
2931
uses: actions/setup-java@v1
3032
with:
3133
java-version: 11
32-
34+
3335
- name: Grant execute permission for gradlew
3436
run: chmod +x gradlew
35-
37+
3638
- name: Build the plugin
37-
run: ./gradlew buildPlugin
39+
run: ./gradlew publishPlugin
3840
env:
39-
LD_VERSION: ${{ env.LD_VERSION }}
40-
41-
- name: Verify plugin
42-
id: verify
43-
uses: ChrisCarini/intellij-platform-plugin-verifier-action@v1.0.5
44-
with:
45-
failure-levels: |
46-
INVALID_PLUGIN
47-
ide-versions: |
48-
ideaIC:2021.1
49-
ideaIC:LATEST-EAP-SNAPSHOT
50-
51-
- name: Print verify contents
52-
run: |
53-
echo "The log file path is: ${{steps.verify.outputs.verification-output-log-filename}}" ;
54-
cat ${{steps.verify.outputs.verification-output-log-filename}}
55-
41+
LD_VERSION: ${{ env.LD_VERSION }}
42+
PUBLISH_TOKEN: ${{ env.PUBLISH_TOKEN }}
43+
44+
# - name: Verify plugin
45+
# id: verify
46+
# uses: ChrisCarini/intellij-platform-plugin-verifier-action@v1.0.5
47+
# with:
48+
# failure-levels: |
49+
# INVALID_PLUGIN
50+
# ide-versions: |
51+
# ideaIC:2020.3
52+
# ideaIC:LATEST-EAP-SNAPSHOT
53+
54+
# - name: Print verify contents
55+
# run: |
56+
# echo "The log file path is: ${{steps.verify.outputs.verification-output-log-filename}}" ;
57+
# cat ${{steps.verify.outputs.verification-output-log-filename}}
58+
5659
- name: Create Release
5760
id: create_release
5861
uses: actions/create-release@v1
@@ -63,14 +66,14 @@ jobs:
6366
release_name: v${{ env.LD_VERSION }}
6467
draft: true
6568
prerelease: false
66-
69+
6770
- name: Upload Release Asset
68-
id: upload-release-asset
71+
id: upload-release-asset
6972
uses: actions/upload-release-asset@v1
7073
env:
7174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7275
with:
73-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
76+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
7477
asset_path: ./build/distributions/leetcode-editor-${{ env.LD_VERSION }}.zip
7578
asset_name: leetcode-editor-${{ env.LD_VERSION }}.zip
76-
asset_content_type: application/zip
79+
asset_content_type: application/zip

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- Keep a Changelog guide -> https://keepachangelog.com -->
2+
3+
# Leetcode Editor Changelog
4+
5+
## 8.2.0
6+
7+
### Added
8+
- 增加了不同的窗口,包括*分页窗口**全部题目窗口**[CodeTop](https://codetop.cc/?utm_source=leetcode_editor)窗口*,可以在导航栏中通过按钮切换.
9+
- Added different windows, including paging window, all problem window, [CodeTop](https://codetop.cc/?utm_source=leetcode_editor) window, which can be switched by buttons in the navigation bar.
10+
11+
- 增加数据统计信息存储,可配合[action](https://github.com/shuzijun/leetcode-editor/blob/master/action/README_ZH.md)生成勋章
12+
- Increase the storage of data statistics, you can use [action](https://github.com/shuzijun/leetcode-editor/tree/master/action) to generate medals
13+
14+
15+
### Changed
16+
- 修改消息通知方式
17+
- Modify the message notification method
18+
19+
- 更改窗口位置
20+
- Change window position
21+
### Deprecated
22+
23+
### Fixed
24+
- fix bugs
25+
26+
### Removed
27+

build.gradle

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
plugins {
22
id 'java-library'
3-
id 'org.jetbrains.intellij' version '1.0'
3+
id 'org.jetbrains.intellij' version '1.7.0-SNAPSHOT'
4+
id 'org.jetbrains.changelog' version "1.3.1"
45
id "de.undercouch.download" version "4.0.2"
56
}
67

7-
group 'com.shuzijun.leetcode'
8-
version (System.getenv('LD_VERSION')==null ? project.plugin_version :System.getenv('LD_VERSION')) + (project.build_env.isEmpty() ? "" : "-") + project.build_env
8+
apply plugin: 'org.jetbrains.changelog'
9+
10+
group project.pluginGroup
11+
version (System.getenv('LD_VERSION')==null ? project.pluginVersion :System.getenv('LD_VERSION'))
912

1013
sourceCompatibility = 11
1114
targetCompatibility = 11
1215

16+
1317
repositories {
1418
mavenCentral()
1519
}
@@ -31,47 +35,37 @@ dependencies {
3135

3236
// See https://github.com/JetBrains/gradle-intellij-plugin/
3337
intellij {
34-
pluginName = 'leetcode-editor'
35-
version = project.intellij_version
36-
type = 'IU'
38+
pluginName = project.pluginName
39+
version = project.platformVersion
40+
type = project.platformType
3741
downloadSources = true
3842
updateSinceUntilBuild = false
3943
buildSearchableOptions.enabled = false
4044
ideaDependencyCachePath = "$gradle.gradleUserHomeDir/caches/modules-2/files-2.1/com.jetbrains.intellij.idea"
41-
/* localPath project.idea_local_path
42-
alternativeIdePath project.idea_local_path*/
43-
/*plugins = project.intellij_plugins.split(",").toList()*/
45+
4446
runIde {
45-
jvmArgs = ["-Dfile.encoding=utf-8"]
47+
jvmArgs = project.runIdeJvmArgs.split(',').toList()
4648
}
47-
/* prepareSandbox {
48-
from("src/main/natives" + (project.build_env.isEmpty() ? "" : "-") + project.build_env) { into(getPluginName() + '/natives') }
49-
}*/
50-
51-
}
52-
53-
tasks.withType(JavaCompile) {
54-
options.encoding = "UTF-8"
55-
}
5649

50+
patchPluginXml {
51+
sinceBuild = project.pluginSinceBuild
52+
untilBuild = project.pluginUntilBuild
53+
changeNotes.set(provider { changelog.get(project.version+".0").toHTML() })
54+
}
5755

56+
publishPlugin {
57+
dependsOn("patchChangelog")
58+
token = System.getenv("PUBLISH_TOKEN")
59+
}
5860

61+
}
5962

63+
changelog {
6064

61-
/*
62-
task downloadJCEF(type: Copy) {
63-
if (project.build_env.isEmpty()) {
64-
return
65-
}
66-
def tempFile = new File(buildDir, "/download/natives-" + project.build_env + ".zip")
67-
download {
68-
src("https://github.com/shuzijun/leetcode-editor/releases/download/" + project.jcef_version + "/natives-" + project.build_env + ".zip")
69-
dest tempFile
70-
}
65+
}
7166

72-
from zipTree(tempFile)
73-
into "src/main/"
67+
tasks.withType(JavaCompile) {
68+
options.encoding = "UTF-8"
7469
}
75-
*/
7670

7771

doc/2020.jpg

-64.8 KB
Binary file not shown.

doc/LeetCodeIcon.png

-415 Bytes
Binary file not shown.

doc/clear.png

-206 Bytes
Binary file not shown.

doc/collapseAll.png

-383 Bytes
Binary file not shown.

doc/config-3.0.png

-19.5 KB
Binary file not shown.

doc/config.png

-245 Bytes
Binary file not shown.

doc/customConfig.png

-133 KB
Binary file not shown.

0 commit comments

Comments
 (0)