File tree Expand file tree Collapse file tree 4 files changed +80
-1
lines changed Expand file tree Collapse file tree 4 files changed +80
-1
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,14 @@ plugins {
55 id ' org.sonarqube'
66}
77
8+ apply from : " ${ rootDir} /gradle/publish.gradle"
9+
810java {
911 toolchain {
1012 languageVersion = JavaLanguageVersion . of(17 )
1113 }
14+ withSourcesJar()
15+ withJavadocJar()
1216}
1317
1418jacocoTestReport {
Original file line number Diff line number Diff line change 1+ group =com.contentgrid.hal.client
2+ description =HAL and HAL-FORMS client
Original file line number Diff line number Diff line change 1+ apply plugin : ' maven-publish'
2+ apply plugin : ' signing'
3+
4+ publishing {
5+ publications {
6+
7+ all {
8+ pom {
9+ url = ' https://github.com/xenit-eu/java-hal-client'
10+ name = project. name
11+ description = project. description
12+
13+ scm {
14+ connection
= ' scm:git:[email protected] :xenit-eu/java-hal-client.git' 15+ developerConnection
= ' scm:git:[email protected] :xenit-eu/java-hal-client.git' 16+ url = ' https://github.com/xenit-eu/java-hal-client.git'
17+ }
18+
19+ developers {
20+ developer {
21+ name = " XeniT"
22+ organization = " XeniT Solutions NV"
23+ }
24+ }
25+
26+ licenses {
27+ license {
28+ name = ' The Apache License, Version 2.0'
29+ url = ' https://www.apache.org/licenses/LICENSE-2.0'
30+ }
31+ }
32+ }
33+ }
34+
35+ library(MavenPublication ) {
36+ from components. java
37+
38+ versionMapping {
39+ usage(" java-api" ) {
40+ fromResolutionResult()
41+ }
42+ usage(" java-runtime" ) {
43+ fromResolutionResult()
44+ }
45+ }
46+ }
47+ }
48+
49+ repositories {
50+ if (" ${ project.version} " . endsWith(' -SNAPSHOT' )) {
51+ sonatypeSnapshots {
52+ url = " https://s01.oss.sonatype.org/content/repositories/snapshots/"
53+ credentials {
54+ username = project. findProperty(' sonatype_username' )
55+ password = project. findProperty(' sonatype_password' )
56+ }
57+ }
58+ } else {
59+ sonatypeMavenCentral {
60+ url = " https://s01.oss.sonatype.org/service/local/"
61+ credentials {
62+ username = project. findProperty(' sonatype_username' )
63+ password = project. findProperty(' sonatype_password' )
64+ }
65+ }
66+ }
67+ }
68+
69+ }
70+
71+ tasks. named(' check' ). configure {
72+ dependsOn(' checkMavenCentralRequirements' )
73+ }
Original file line number Diff line number Diff line change @@ -23,4 +23,4 @@ reckon {
2323 stageCalc = { inventory , targetNormal -> java.util.Optional . empty() }
2424}
2525
26- rootProject. name = ' java- hal-client'
26+ rootProject. name = ' hal-client'
You can’t perform that action at this time.
0 commit comments