@@ -7,7 +7,7 @@ plugins {
7
7
// Makes sure to update the kotlin version below in the test resources as well.
8
8
kotlin(" jvm" ) version " 1.2.51"
9
9
`maven- publish`
10
- id (" com.gradle.plugin-publish" ) version " 0.9.10"
10
+ id(" com.gradle.plugin-publish" ) version " 0.9.10"
11
11
}
12
12
13
13
group = " org.gradleweaver.plugins"
@@ -20,7 +20,6 @@ repositories {
20
20
21
21
dependencies {
22
22
compileOnly(gradleApi())
23
- compile(kotlin(" stdlib-jdk8" ))
24
23
testCompileOnly(gradleTestKit())
25
24
26
25
fun junitJupiter (name : String , version : String = "5.2.0") =
@@ -49,39 +48,33 @@ publishing {
49
48
}
50
49
51
50
52
- configure< JavaPluginConvention > {
51
+ java {
53
52
sourceCompatibility = JavaVersion .VERSION_1_8
54
53
}
55
54
56
- tasks.withType<KotlinCompile > {
55
+ tasks.withType<KotlinCompile >().configureEach {
57
56
kotlinOptions.jvmTarget = " 1.8"
58
57
}
59
58
60
- tasks.withType<Test > {
59
+ tasks.withType<Test >().configureEach {
61
60
useJUnitPlatform()
62
61
}
63
62
64
- gradlePlugin {
65
- plugins {
66
- register(" jlink-plugin" ) {
67
- id = " ${project.group} .${project.name} "
68
- implementationClass = " org.gradleweaver.plugins.jlink.JLinkPlugin"
69
- description = " A Gradle plugin for handling platform-specific dependencies and releases."
70
- }
71
- }
63
+ val registeredPlugin = gradlePlugin.plugins.register(" jlink-plugin" ) {
64
+ id = " ${project.group} .${project.name} "
65
+ implementationClass = " org.gradleweaver.plugins.jlink.JLinkPlugin"
66
+ description = " A Gradle plugin for handling platform-specific dependencies and releases."
72
67
}
73
68
74
69
pluginBundle {
75
- val plugin = gradlePlugin.plugins[" jlink-plugin" ]
76
-
77
70
website = " https://github.com/gradleweaver/jlink-plugin"
78
71
vcsUrl = " https://github.com/gradleweaver/jlink-plugin"
79
72
tags = listOf (" jlink" )
80
73
81
74
plugins {
82
75
create(" jlink-plugin" ) {
83
- id = plugin .id
84
- displayName = plugin .displayName
76
+ id = registeredPlugin.get() .id
77
+ displayName = registeredPlugin.get() .displayName
85
78
}
86
79
}
87
80
}
@@ -94,7 +87,7 @@ tasks {
94
87
val writeTestProperties by creating(WriteProperties ::class ) {
95
88
outputFile = processTestResources.destinationDir.resolve(" test.properties" )
96
89
property(" version" , version)
97
- property(" kotlinVersion" , " 1.2.51 " )
90
+ property(" kotlinVersion" , KotlinVersion . CURRENT )
98
91
}
99
92
processTestResources.dependsOn(writeTestProperties)
100
93
" test" {
0 commit comments