Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit ecddbba

Browse files
committed
build: Get deploy working
1 parent 9ddd2fe commit ecddbba

File tree

1 file changed

+54
-6
lines changed

1 file changed

+54
-6
lines changed

build.gradle

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
id 'java-library'
55
id 'java-library-distribution'
66
id 'maven-publish'
7+
id 'org.jreleaser' version '1.12.0'
78
id "com.google.protobuf" version "0.9.4"
89

910
}
@@ -103,6 +104,9 @@ java {
103104
publishing {
104105
publications {
105106
contractcase(MavenPublication) {
107+
groupId = 'io.contract-testing.contractcase'
108+
artifactId = 'contract-case'
109+
version = version
106110
from components.java
107111
versionMapping {
108112
usage('java-api') {
@@ -112,16 +116,35 @@ publishing {
112116
fromResolutionResult()
113117
}
114118
}
119+
120+
pom {
121+
name = 'contract-case'
122+
description = 'ContractCase Java DSL'
123+
url = 'https://case.contract-testing.io/'
124+
inceptionYear = '2022'
125+
licenses {
126+
license {
127+
name = 'BSD-3-Clause'
128+
url = 'https://spdx.org/licenses/BSD-3-Clause.html'
129+
}
130+
}
131+
developers {
132+
developer {
133+
id = 'TimothyJones'
134+
name = 'Timothy Jones'
135+
}
136+
}
137+
scm {
138+
connection = 'scm:git:https://github.com/case-contract-testing/java-dsl.git'
139+
developerConnection = 'scm:git:ssh://github.com/case-contract-testing/java-dsl.git'
140+
url = 'https://github.com/case-contract-testing/java-dsl'
141+
}
142+
}
115143
}
116144
}
117145
repositories {
118146
maven {
119-
name = "OSSRH"
120-
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
121-
credentials {
122-
username = System.getenv("MAVEN_USERNAME")
123-
password = System.getenv("MAVEN_PASSWORD")
124-
}
147+
url = layout.buildDirectory.dir('staging-deploy')
125148
}
126149
mavenLocal()
127150
}
@@ -137,4 +160,29 @@ publishing {
137160
}
138161
}
139162
}*/
163+
}
164+
165+
jreleaser {
166+
signing {
167+
active = 'ALWAYS'
168+
armored = true
169+
}
170+
deploy {
171+
maven {
172+
nexus2 {
173+
'maven-central' {
174+
active = 'ALWAYS'
175+
url = 'https://s01.oss.sonatype.org/service/local'
176+
snapshotUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
177+
closeRepository = true
178+
releaseRepository = true
179+
username = System.getenv("MAVEN_USERNAME")
180+
password = System.getenv("MAVEN_PASSWORD")
181+
applyMavenCentralRules = true
182+
183+
stagingRepository('build/staging-deploy')
184+
}
185+
}
186+
}
187+
}
140188
}

0 commit comments

Comments
 (0)