1
+ import java.text.SimpleDateFormat
2
+
1
3
plugins {
2
4
id ' java-library'
3
5
id ' java-library-distribution'
4
6
id ' maven-publish'
5
7
id " com.google.protobuf" version " 0.9.4"
6
8
7
9
}
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
10
12
11
13
sourceCompatibility = ' 17'
12
14
@@ -35,8 +37,6 @@ dependencies {
35
37
testImplementation ' org.junit.jupiter:junit-jupiter-api:5.10.2'
36
38
testRuntimeOnly ' org.junit.jupiter:junit-jupiter-engine:5.10.2'
37
39
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")
40
40
}
41
41
42
42
test {
@@ -45,6 +45,16 @@ test {
45
45
46
46
jar {
47
47
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
+ }
48
58
}
49
59
50
60
sourceSets {
@@ -103,30 +113,28 @@ publishing {
103
113
}
104
114
}
105
115
}
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
- }*/
128
116
}
129
117
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
+ }
130
126
mavenLocal()
131
127
}
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
+ }*/
132
140
}
0 commit comments