Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 12, 2022. It is now read-only.

Commit f70d230

Browse files
Merge pull request #270 from cedricziel/gradle-update
2 parents 624e5de + 50cfa1f commit f70d230

File tree

6 files changed

+151
-59
lines changed

6 files changed

+151
-59
lines changed

‎.github/workflows/build.yml‎

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# GitHub Actions Workflow created for testing and preparing the plugin release in following steps:
2+
# - validate Gradle Wrapper,
3+
# - run test and verifyPlugin tasks,
4+
# - run buildPlugin task and prepare artifact for the further tests,
5+
# - run IntelliJ Plugin Verifier,
6+
# - create a draft release.
7+
#
8+
# Workflow is triggered on push and pull_request events.
9+
#
10+
# Docs:
11+
# - GitHub Actions: https://help.github.com/en/actions
12+
# - IntelliJ Plugin Verifier GitHub Action: https://github.com/ChrisCarini/intellij-platform-plugin-verifier-action
13+
#
14+
## JBIJPPTPL
15+
16+
name: Build
17+
on: [push, pull_request]
18+
jobs:
19+
20+
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
21+
gradleValidation:
22+
name: Gradle Wrapper
23+
runs-on: ubuntu-latest
24+
steps:
25+
26+
# Check out current repository
27+
- name: Fetch Sources
28+
uses: actions/checkout@v2
29+
30+
# Validate wrapper
31+
- name: Gradle Wrapper Validation
32+
uses: gradle/wrapper-validation-action@v1.0.3
33+
34+
# Run verifyPlugin and test Gradle tasks
35+
test:
36+
name: Test
37+
needs: gradleValidation
38+
runs-on: ubuntu-latest
39+
steps:
40+
41+
# Setup Java 1.8 environment for the next steps
42+
- name: Setup Java
43+
uses: actions/setup-java@v1
44+
with:
45+
java-version: 1.8
46+
47+
# Check out current repository
48+
- name: Fetch Sources
49+
uses: actions/checkout@v2
50+
51+
# Cache Gradle dependencies
52+
- name: Setup Gradle Dependencies Cache
53+
uses: actions/cache@v2
54+
with:
55+
path: ~/.gradle/caches
56+
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle', 'gradle.properties') }}
57+
58+
# Cache Gradle Wrapper
59+
- name: Setup Gradle Wrapper Cache
60+
uses: actions/cache@v2
61+
with:
62+
path: ~/.gradle/wrapper
63+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
64+
65+
# Run detekt, ktlint and tests
66+
- name: Run Linters and Test
67+
run: ./gradlew check
68+
69+
# Run verifyPlugin Gradle task
70+
- name: Verify Plugin
71+
run: ./gradlew verifyPlugin
72+
73+
# Build plugin with buildPlugin Gradle task and provide the artifact for the next workflow jobs
74+
# Requires test job to be passed
75+
build:
76+
name: Build
77+
needs: test
78+
runs-on: ubuntu-latest
79+
outputs:
80+
name: ${{ steps.properties.outputs.name }}
81+
version: ${{ steps.properties.outputs.version }}
82+
artifact: ${{ steps.properties.outputs.artifact }}
83+
steps:
84+
85+
# Setup Java 1.8 environment for the next steps
86+
- name: Setup Java
87+
uses: actions/setup-java@v1
88+
with:
89+
java-version: 1.8
90+
91+
# Check out current repository
92+
- name: Fetch Sources
93+
uses: actions/checkout@v2
94+
95+
# Cache Gradle Dependencies
96+
- name: Setup Gradle Dependencies Cache
97+
uses: actions/cache@v2
98+
with:
99+
path: ~/.gradle/caches
100+
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle', 'gradle.properties') }}
101+
102+
# Cache Gradle Wrapper
103+
- name: Setup Gradle Wrapper Cache
104+
uses: actions/cache@v2
105+
with:
106+
path: ~/.gradle/wrapper
107+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
108+
109+
# Build artifact using buildPlugin Gradle task
110+
- name: Build Plugin
111+
run: ./gradlew buildPlugin
112+
113+
# Upload plugin artifact to make it available in the next jobs
114+
- name: Upload artifact
115+
uses: actions/upload-artifact@v1
116+
with:
117+
name: plugin-artifact
118+
path: ./build/distributions/${{ steps.properties.outputs.artifact }}

‎build.gradle‎

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
11
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
22

3-
buildscript {
4-
repositories {
5-
mavenCentral()
6-
maven {
7-
url "https://oss.sonatype.org/content/repositories/snapshots/"
8-
}
9-
maven {
10-
url 'https://dl.bintray.com/jetbrains/intellij-plugin-service'
11-
}
12-
13-
}
14-
dependencies {
15-
classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.5.0-SNAPSHOT"
16-
}
17-
}
18-
193
plugins {
20-
id "org.jetbrains.intellij" version "0.4.9"
214
id 'com.palantir.git-version' version "0.11.0"
5+
id "org.jetbrains.intellij" version "0.6.5"
6+
}
7+
8+
repositories {
9+
jcenter()
10+
mavenCentral()
2211
}
2312

2413
def htmlFixer = { htmlFile -> file(htmlFile).text.replace('<html>', '').replace('</html>', '') }
2514

2615
apply plugin: 'idea'
27-
apply plugin: 'org.jetbrains.intellij'
2816
apply plugin: 'java'
2917

3018
sourceCompatibility = 1.8
@@ -63,7 +51,7 @@ if (details.isCleanTag) {
6351
}
6452

6553
wrapper {
66-
gradleVersion '5.5.1'
54+
gradleVersion '6.8.2'
6755
}
6856

6957
test.testLogging.exceptionFormat = TestExceptionFormat.FULL

‎gradle/wrapper/gradle-wrapper.jar‎

3.5 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

‎gradlew‎

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# you may not use this file except in compliance with the License.
88
# You may obtain a copy of the License at
99
#
10-
# http://www.apache.org/licenses/LICENSE-2.0
10+
# https://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
# Unless required by applicable law or agreed to in writing, software
1313
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -82,6 +82,7 @@ esac
8282

8383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8484

85+
8586
# Determine the Java command to use to start the JVM.
8687
if [ -n "$JAVA_HOME" ] ; then
8788
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -125,10 +126,11 @@ if $darwin; then
125126
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126127
fi
127128

128-
# For Cygwin, switch paths to Windows format before running java
129-
if $cygwin ; then
129+
# For Cygwin or MSYS, switch paths to Windows format before running java
130+
if [ "$cygwin"="true"-o"$msys"="true" ] ; then
130131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
132134
JAVACMD=`cygpath --unix "$JAVACMD"`
133135

134136
# We build the pattern for arguments to be converted via cygpath
@@ -154,19 +156,19 @@ if $cygwin ; then
154156
else
155157
eval `echo args$i`="\"$arg\""
156158
fi
157-
i=$((i+1))
159+
i=`expr $i + 1`
158160
done
159161
case $i in
160-
(0) set -- ;;
161-
(1) set -- "$args0" ;;
162-
(2) set -- "$args0" "$args1" ;;
163-
(3) set -- "$args0" "$args1" "$args2" ;;
164-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170172
esac
171173
fi
172174

@@ -175,14 +177,9 @@ save () {
175177
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176178
echo " "
177179
}
178-
APP_ARGS=$(save "$@")
180+
APP_ARGS=`save "$@"`
179181

180182
# Collect all arguments for the java command, following the shell quoting and substitution rules
181183
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182184

183-
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184-
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185-
cd "$(dirname "0ドル")"
186-
fi
187-
188185
exec "$JAVACMD" "$@"

‎gradlew.bat‎

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@rem you may not use this file except in compliance with the License.
66
@rem You may obtain a copy of the License at
77
@rem
8-
@rem http://www.apache.org/licenses/LICENSE-2.0
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
99
@rem
1010
@rem Unless required by applicable law or agreed to in writing, software
1111
@rem distributed under the License is distributed on an "AS IS" BASIS,
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%
3131

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
3235
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
3336
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
3437

@@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
3740

3841
set JAVA_EXE=java.exe
3942
%JAVA_EXE% -version >NUL 2>&1
40-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
4144

4245
echo.
4346
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -51,7 +54,7 @@ goto fail
5154
set JAVA_HOME=%JAVA_HOME:"=%
5255
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5356

54-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
5558

5659
echo.
5760
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -61,28 +64,14 @@ echo location of your Java installation.
6164

6265
goto fail
6366

64-
:init
65-
@rem Get command-line arguments, handling Windows variants
66-
67-
if not "%OS%" == "Windows_NT" goto win9xME_args
68-
69-
:win9xME_args
70-
@rem Slurp the command line arguments.
71-
set CMD_LINE_ARGS=
72-
set _SKIP=2
73-
74-
:win9xME_args_slurp
75-
if "x%~1" == "x" goto execute
76-
77-
set CMD_LINE_ARGS=%*
78-
7967
:execute
8068
@rem Setup the command line
8169

8270
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8371

72+
8473
@rem Execute Gradle
85-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
8675

8776
:end
8877
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /