1
- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1
+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
2
2
3
3
plugins {
4
- id(" com.gradle.plugin-publish" )
5
- `java- gradle- plugin`
6
- `maven- publish`
7
- signing
4
+ id(" gradle-plugin" )
8
5
`kotlin- dsl`
9
6
}
10
7
@@ -15,30 +12,12 @@ gradlePlugin {
15
12
displayName = " Dependency notation generator & updates"
16
13
description = " Generates dependency notations constants in buildSrc and " +
17
14
" updates the versions with gradle refreshVersions"
15
+ tags = listOf (" dependencies" , " versions" , " buildSrc" , " kotlin" , " kotlin-dsl" )
18
16
implementationClass = " de.fayard.buildSrcLibs.BuildSrcLibsPlugin"
19
17
}
20
18
}
21
19
}
22
20
23
- pluginBundle {
24
- website = " https://jmfayard.github.io/refreshVersions"
25
- vcsUrl = " https://github.com/jmfayard/refreshVersions"
26
- tags = listOf (" dependencies" , " versions" , " buildSrc" , " kotlin" , " kotlin-dsl" )
27
- }
28
-
29
- signing {
30
- useInMemoryPgpKeys(
31
- propertyOrEnvOrNull(" GPG_key_id" ),
32
- propertyOrEnvOrNull(" GPG_private_key" ) ? : return @signing,
33
- propertyOrEnv(" GPG_private_password" )
34
- )
35
- sign(publishing.publications)
36
- }
37
-
38
- publishing {
39
- setupAllPublications(project)
40
- }
41
-
42
21
dependencies {
43
22
44
23
api(project(" :refreshVersions-core" ))
@@ -60,20 +39,14 @@ dependencies {
60
39
}
61
40
62
41
63
- tasks.withType< KotlinCompile >().configureEach {
64
- kotlinOptions.jvmTarget = " 1.8 "
65
- kotlinOptions.freeCompilerArgs + = listOf (
66
- " -Xopt-in=kotlin.RequiresOptIn " ,
67
- " -Xopt -in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi"
68
- )
42
+ kotlin {
43
+ jvmToolchain( 8 )
44
+ compilerOptions {
45
+ apiVersion = KotlinVersion . KOTLIN_1_8 // https://docs.gradle.org/current/userguide/compatibility.html#kotlin
46
+ freeCompilerArgs.add( " -opt -in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi" )
47
+ }
69
48
}
70
49
71
50
tasks.withType<Test >().configureEach {
72
51
useJUnitPlatform()
73
52
}
74
-
75
- java {
76
- sourceCompatibility = JavaVersion .VERSION_1_8
77
- targetCompatibility = JavaVersion .VERSION_1_8
78
- withSourcesJar()
79
- }
0 commit comments