11plugins {
22 id(" java-gradle-plugin" )
3+ id(" org.gradlex.build-parameters" ) version " 1.4.4"
34 id(" org.gradlex.internal.plugin-publish-conventions" ) version " 0.6"
45}
56
6- group = " org.gradlex"
77version = " 0.7"
88
9- java {
10- toolchain.languageVersion = JavaLanguageVersion .of(11 )
9+ dependencies {
10+ implementation(" com.diffplug.spotless:spotless-plugin-gradle:8.0.0" ) {
11+ // Exclude transitive dependencies of JGit as we do not need git functionality.
12+ // We can't exclude JGit itself as types are referenced in SpotlessTask.class.
13+ exclude(" com.googlecode.javaewah" , " JavaEWAH" )
14+ exclude(" commons-codec" , " commons-codec" )
15+ exclude(" org.slf4j" , " slf4j-api" )
16+ }
17+ implementation(" com.gradle.publish:plugin-publish-plugin:2.0.0" )
18+ implementation(" com.gradle:common-custom-user-data-gradle-plugin:2.4.0" )
19+ implementation(" com.gradle:develocity-gradle-plugin:4.2.2" )
20+ implementation(" com.gradleup.nmcp:nmcp:1.2.0" )
21+ implementation(" org.asciidoctor:asciidoctor-gradle-jvm:4.0.5" )
22+ implementation(" org.gradlex:jvm-dependency-conflict-resolution:2.4" )
23+ implementation(" org.gradlex:reproducible-builds:1.1" )
24+ }
25+
26+ dependencies.constraints {
27+ implementation(" org.jetbrains:annotations:13.0!!" ) {
28+ because(" This version is enforced by Gradle through the Kotlin plugin" )
29+ }
30+ }
31+
32+ // ==== the following can be remove once we update the onventions to '0.7'
33+ group = " org.gradlex"
34+ java { toolchain.languageVersion = JavaLanguageVersion .of(17 ) }
35+ tasks.checkstyleMain { exclude(" buildparameters/**" ) }
36+ // ====
37+
38+ buildParameters {
39+ pluginId(" org.gradlex.internal.gradlex-build-parameters" )
40+ bool(" ci" ) {
41+ description = " Whether or not the build is running in a CI environment"
42+ fromEnvironment()
43+ defaultValue = false
44+ }
45+ group(" signing" ) {
46+ // allow to disable signing for locat testing
47+ bool(" disable" ) {
48+ defaultValue = false
49+ }
50+ // key and passphrase need default values because SigningExtension.useInMemoryPgpKeys does not accept providers
51+ description = " Details about artifact signing"
52+ string(" key" ) {
53+ description = " The ID of the PGP key to use for signing artifacts"
54+ fromEnvironment()
55+ defaultValue = " UNSET"
56+ }
57+ string(" passphrase" ) {
58+ description = " The passphrase for the PGP key specified by signing.key"
59+ fromEnvironment()
60+ defaultValue = " UNSET"
61+ }
62+ }
63+ group(" pluginPortal" ) {
64+ // The publish-plugin reads these values directly from System.env. We model them here
65+ // for completeness and documentation purposes.
66+ description = " Credentials for publishing to the plugin portal"
67+ string(" key" ) {
68+ description = " The Plugin portal key for publishing the plugin"
69+ fromEnvironment(" GRADLE_PUBLISH_KEY" )
70+ }
71+ string(" secret" ) {
72+ description = " The Plugin portal secret for publishing the plugin"
73+ fromEnvironment(" GRADLE_PUBLISH_SECRET" )
74+ }
75+ }
76+
77+ group(" mavenCentral" ) {
78+ description = " Credentials for publishing to Maven Central"
79+ string(" username" ) {
80+ description = " The Maven Central username for publishing"
81+ fromEnvironment()
82+ }
83+ string(" password" ) {
84+ description = " The Maven Central password for publishing"
85+ fromEnvironment()
86+ }
87+ }
1188}
1289
1390pluginPublishConventions {
14- id(" ${project.group} .internal. ${project.name} " )
15- implementationClass(" org.gradlex.conventions.pluginpublish.PluginPublishConventionsPlugin " )
16- displayName(" Plugin Publish Conventions Gradle plugin " )
17- description(" Conventions for publishing GradleX plugins." )
91+ id(" ${project.group} .${project.name} " )
92+ implementationClass(" org.gradlex.conventions.plugin.GradleXPluginConventionsPlugin " )
93+ displayName(" Conventions for building Gradle plugins " )
94+ description(" Conventions for building Gradle plugins used by all projects in the GradleX organisation ." )
1895 tags(" gradlex" , " conventions" , " publish" , " plugins" )
1996 gitHub(" https://github.com/gradlex-org/plugin-publish-conventions" )
2097 developer {
@@ -27,8 +104,9 @@ pluginPublishConventions {
27104 name = " Jendrik Johannes"
2810529106 }
30- }
31-
32- dependencies {
33- implementation(" com.gradle.publish:plugin-publish-plugin:2.0.0" )
34- }
107+ developer {
108+ id = " ljacomet"
109+ name = " Louis Jacomet"
110+ 111+ }
112+ }
0 commit comments