@@ -3,47 +3,13 @@ plugins {
33 id " groovy"
44 id " java"
55 id " java-library"
6- id " signing"
76 id " maven-publish"
8- id " com.google.cloud.artifactregistry.gradle-plugin " version " 2.2.0 "
7+ id " com.maxxton.convention " version " 3.3.2 "
98}
109
11- publishing {
12- publications {
13- mavenJava(MavenPublication ) {
14- from components. java
15- pom {
16- name = ' MicroDocs Gradle Crawler'
17- description = ' MicroDocs crawler for gradle projects'
18- url = ' https://github.com/MaxxtonGroup/microdocs'
19- licenses {
20- license {
21- name = ' The Apache Software License, Version 2.0'
22- url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
23- distribution = ' repo'
24- }
25- }
26- developers {
27- developer {
28- id = ' s.hermans'
29- name = ' Steven Hermans'
30- }
31- }
32- scm {
33- url = ' scm:git@github.com:MaxxtonGroup/microdocs.git'
34- connection = ' scm:git@github.com:MaxxtonGroup/microdocs.git'
35- developerConnection = ' scm:git@github.com:MaxxtonGroup/microdocs.git'
36- }
37- }
38- }
39- }
40- repositories {
41- // mavenLocal()
42- maven {
43- url " artifactregistry://europe-maven.pkg.dev/dynamic-concept-192711/maxxton-maven-registry"
44- }
45- }
46- }
10+ // Publishing (mavenJava publication + maxxton-maven-registry repository) is
11+ // auto-configured by the com.maxxton.convention plugin once maven-publish
12+ // and java are detected - see PublishingConfiguration in maxxton-conventions.
4713
4814repositories {
4915 mavenCentral()
@@ -60,8 +26,8 @@ dependencies {
6026 api(" com.maxxton:microdocs-core-java:3.0.0" )
6127}
6228
63- group = ' com.maxxton '
64- version = ' 4.0.1 '
29+ // group and version now come from gradle.properties, set before
30+ // the com.maxxton.convention plugin's PublishingConfiguration reads them.
6531
6632
6733task fatJar (type : Jar , dependsOn : ' jar' ) {
@@ -88,10 +54,9 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
8854 from ' build/docs/javadoc'
8955}
9056
91- task sourcesJar (type : Jar ) {
92- from sourceSets. main. allSource
93- archiveClassifier = ' sources'
94- }
57+ // sourcesJar is created automatically by withSourcesJar() below (via the
58+ // com.maxxton.convention plugin's PublishingConfiguration, which calls it
59+ // as soon as maven-publish is applied).
9560
9661artifacts {
9762 archives fatJar
@@ -104,8 +69,3 @@ java {
10469 withJavadocJar()
10570 withSourcesJar()
10671}
107-
108- signing {
109- sign configurations. archives
110- sign publishing. publications
111- }
0 commit comments