Skip to content

Commit 9b9ca82

Browse files
committed
Update Gradle wrapper to 4.1 and minor cleanup for Gradle build script
1 parent 068c000 commit 9b9ca82

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

build.gradle.kts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ plugins {
2727
id("org.jetbrains.kotlin.jvm") version "1.1.3-2" // kept in sync with IntelliJ's bundled dep
2828
groovy
2929
idea
30-
id("org.jetbrains.intellij") version "0.2.15"
30+
id("org.jetbrains.intellij") version "0.2.17"
3131
id("net.minecrell.licenser") version "0.3"
3232
}
3333

@@ -50,7 +50,7 @@ val processResources: AbstractCopyTask by tasks
5050
val test: Test by tasks
5151
val runIde: JavaExec by tasks
5252
val publishPlugin: PublishTask by tasks
53-
val clean: Task by tasks
53+
val clean: Delete by tasks
5454

5555
configurations {
5656
"kotlin"()
@@ -244,15 +244,12 @@ val generate = task("generate") {
244244

245245
java.sourceSets[SourceSet.MAIN_SOURCE_SET_NAME].java.srcDir(generate)
246246

247+
// Remove gen directory on clean
248+
clean.delete(generate)
249+
247250
// Workaround for KT-16764
248251
compileKotlin.inputs.dir(generate)
249252

250-
// Workaround problems caused by separate output directories for classes in Gradle 4.0
251-
// gradle-intellij-plugin needs to be updated to support them properly
252-
java.sourceSets.all {
253-
output.classesDir = File(buildDir, "classes/$name")
254-
}
255-
256253
runIde {
257254
maxHeapSize = "2G"
258255

@@ -264,12 +261,6 @@ runIde {
264261
}
265262
}
266263

267-
val cleanGen = task<Delete>("cleanGen") {
268-
delete = setOf(file("gen"))
269-
}
270-
271-
clean.dependsOn(cleanGen)
272-
273264
inline operator fun <T : Task> T.invoke(a: T.() -> Unit): T = apply(a)
274265
fun DependencyHandlerScope.kotlinModule(module: String) = kotlinModule(module, kotlinVersion) as String
275266
fun intellijPlugin(name: String) = mapOf(

gradle/wrapper/gradle-wrapper.jar

-75 Bytes
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Wed Jul 26 23:42:24 CDT 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip

gradlew

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"
3535

36-
warn ( ) {
36+
warn () {
3737
echo "$*"
3838
}
3939

40-
die ( ) {
40+
die () {
4141
echo
4242
echo "$*"
4343
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
155155
fi
156156

157157
# Escape application args
158-
save ( ) {
158+
save () {
159159
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160160
echo " "
161161
}

0 commit comments

Comments
 (0)