1+ import java.text.SimpleDateFormat
2+
13plugins {
24 id ' java-library'
35 id ' java-library-distribution'
46 id ' maven-publish'
57 id " com.google.protobuf" version " 0.9.4"
68
79}
8- group ' io.contract-testing.contractcase'
9- version " 0.0.1" // x-release-please-version
10+ group = ' io.contract-testing.contractcase'
11+ version = " 0.0.1" // x-release-please-version
1012
1113sourceCompatibility = ' 17'
1214
@@ -35,8 +37,6 @@ dependencies {
3537 testImplementation ' org.junit.jupiter:junit-jupiter-api:5.10.2'
3638 testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.10.2'
3739 testImplementation ' com.google.protobuf:protobuf-gradle-plugin:0.9.4'
38- // api("org.junit.jupiter:junit-jupiter-api")
39- // compileOnly("org.junit.jupiter:junit-jupiter")
4040}
4141
4242test {
@@ -45,6 +45,16 @@ test {
4545
4646jar {
4747 duplicatesStrategy(DuplicatesStrategy . WARN )
48+ manifest {
49+ attributes(
50+ ' Build-Timestamp' : new SimpleDateFormat (" yyyy-MM-dd'T'HH:mm:ss.SSSZ" ). format(new Date ()),
51+ ' Build-Jdk' : " ${ System.properties['java.version']} (${ System.properties['java.vendor']} ${ System.properties['java.vm.version']} )" ,
52+ ' Implementation-Version' : version,
53+ ' Implementation-Title' : ' ContractCase Java DSL, for defining and verifying contracts with ContractCase' ,
54+ ' Specification-Title' : ' ContractCase Java DSL, for defining and verifying contracts with ContractCase' ,
55+ ' Specification-Version' : version,
56+ )
57+ }
4858}
4959
5060sourceSets {
@@ -103,30 +113,28 @@ publishing {
103113 }
104114 }
105115 }
106- repositories {
107- maven {
108- name = " OSSRH"
109- url = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
110- credentials {
111- username = System . getenv(" MAVEN_USERNAME" )
112- password = System . getenv(" MAVEN_PASSWORD" )
113- }
114- }
115- }
116- /*
117- contractcase(MavenPublication) {
118- from components.java
119- versionMapping {
120- usage('java-api') {
121- fromResolutionOf('runtimeClasspath')
122- }
123- usage('java-runtime') {
124- fromResolutionResult()
125- }
126- }
127- }*/
128116 }
129117 repositories {
118+ 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+ }
125+ }
130126 mavenLocal()
131127 }
128+ /*
129+ contractcase(MavenPublication) {
130+ from components.java
131+ versionMapping {
132+ usage('java-api') {
133+ fromResolutionOf('runtimeClasspath')
134+ }
135+ usage('java-runtime') {
136+ fromResolutionResult()
137+ }
138+ }
139+ }*/
132140}
0 commit comments