@@ -28,54 +28,47 @@ java {
28
28
}
29
29
30
30
gradlePlugin {
31
+ website.set(" https://opensource.expediagroup.com/graphql-kotlin/docs/" )
32
+ vcsUrl.set(" https://github.com/ExpediaGroup/graphql-kotlin" )
31
33
plugins {
32
34
register(" graphQLPlugin" ) {
33
35
id = " com.expediagroup.graphql"
34
36
displayName = " GraphQL Kotlin Gradle Plugin"
35
37
description = " Gradle Plugin that can generate type-safe GraphQL Kotlin client and GraphQL schema in SDL format using reflections"
36
38
implementationClass = " com.expediagroup.graphql.plugin.gradle.GraphQLGradlePlugin"
39
+ tags.set(listOf (" graphql" , " kotlin" , " graphql-client" , " schema-generator" , " sdl" ))
37
40
}
38
41
}
39
42
}
40
43
41
- pluginBundle {
42
- website = " https://opensource.expediagroup.com/graphql-kotlin/docs/"
43
- vcsUrl = " https://github.com/ExpediaGroup/graphql-kotlin"
44
- tags = listOf (" graphql" , " kotlin" , " graphql-client" , " schema-generator" , " sdl" )
44
+ val generateDefaultVersion by tasks.registering {
45
+ val fileName = " PluginVersion.kt"
46
+ val defaultVersionFile = File (" $buildDir /generated/src/com/expediagroup/graphql/plugin/gradle" , fileName)
47
+
48
+ inputs.property(fileName, project.version)
49
+ outputs.dir(defaultVersionFile.parent)
50
+
51
+ doFirst {
52
+ defaultVersionFile.parentFile.mkdirs()
53
+ defaultVersionFile.writeText(
54
+ """
55
+ package com.expediagroup.graphql.plugin.gradle
56
+ internal const val DEFAULT_PLUGIN_VERSION = "${project.version} "
57
+
58
+ """ .trimIndent()
59
+ )
60
+ }
45
61
}
46
62
47
63
sourceSets {
48
64
main {
49
65
java {
50
- srcDir(" $buildDir /generated/src " )
66
+ srcDir(generateDefaultVersion )
51
67
}
52
68
}
53
69
}
54
70
55
71
tasks {
56
- val generateDefaultVersion by registering {
57
- val fileName = " PluginVersion.kt"
58
- val defaultVersionFile = File (" $buildDir /generated/src/com/expediagroup/graphql/plugin/gradle" , fileName)
59
-
60
- inputs.property(fileName, project.version)
61
- outputs.file(defaultVersionFile)
62
-
63
- doFirst {
64
- defaultVersionFile.parentFile.mkdirs()
65
- defaultVersionFile.writeText(
66
- """
67
- package com.expediagroup.graphql.plugin.gradle
68
- internal const val DEFAULT_PLUGIN_VERSION = "${project.version} "
69
-
70
- """ .trimIndent()
71
- )
72
- }
73
- }
74
-
75
- compileKotlin {
76
- dependsOn(generateDefaultVersion)
77
- }
78
-
79
72
publishPlugins {
80
73
doFirst {
81
74
System .setProperty(" gradle.publish.key" , System .getenv(" PLUGIN_PORTAL_KEY" ))
0 commit comments