Skip to content

Commit 93aae4f

Browse files
committed
Revert Gradle test-fixtures changes
These things messed up the dependencies in the exported POMs. The first commit that exhibits these issues is 7f040fd. See also: #62
2 parents 1bdb93d + 2ea625c commit 93aae4f

File tree

21 files changed

+43
-36
lines changed

21 files changed

+43
-36
lines changed

build.gradle

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ subprojects { project ->
138138
}
139139

140140
if (project.hasProperty('publishMe') && project.publishMe) {
141-
java {
142-
withJavadocJar()
143-
withSourcesJar()
141+
task sourcesJar(type: Jar) {
142+
archiveClassifier = 'sources'
143+
from sourceSets.main.allSource
144144
}
145145

146146
task delombok(type: DelombokTask, dependsOn: classes) {
@@ -165,6 +165,11 @@ subprojects { project ->
165165
options.addStringOption('charset', 'UTF-8')
166166
}
167167

168+
task javadocJar(type: Jar) {
169+
archiveClassifier = 'javadoc'
170+
from javadoc
171+
}
172+
168173
rootProject.tasks.assembleJavadoc {
169174
dependsOn javadoc
170175
inputs.dir javadoc.destinationDir
@@ -182,7 +187,9 @@ subprojects { project ->
182187
publishing {
183188
publications {
184189
jars(MavenPublication) {
185-
setArtifacts([jar, javadocJar, sourcesJar])
190+
from components.java
191+
artifact javadocJar
192+
artifact sourcesJar
186193

187194
pom {
188195
name = project.name

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ include ':webauthn-server-attestation'
33
include ':webauthn-server-core'
44
include ':webauthn-server-demo'
55
include ':yubico-util'
6+
include ':yubico-util-scala'
67

78
include ':test-dependent-projects:java-dep-webauthn-server-attestation'
89
include ':test-dependent-projects:java-dep-webauthn-server-core'

webauthn-server-attestation/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ dependencies {
1717

1818
implementation(
1919
project(':yubico-util'),
20-
addVersion('com.fasterxml.jackson.core:jackson-databind'),
2120
addVersion('com.google.guava:guava'),
21+
addVersion('com.fasterxml.jackson.core:jackson-databind'),
2222
addVersion('org.bouncycastle:bcprov-jdk15on'),
2323
addVersion('org.slf4j:slf4j-api'),
2424
)
2525

2626
testImplementation(
27-
testFixtures(project(':yubico-util')),
28-
testFixtures(project(':webauthn-server-core')),
27+
project(':webauthn-server-core').sourceSets.test.output,
28+
project(':yubico-util-scala'),
2929
addVersion('junit:junit'),
3030
addVersion('org.mockito:mockito-core'),
3131
addVersion('org.scala-lang:scala-library'),
@@ -36,6 +36,10 @@ dependencies {
3636
testRuntimeOnly(
3737
addVersion('ch.qos.logback:logback-classic'),
3838
)
39+
testRuntimeOnly(
40+
// Transitive dependency from :webauthn-server-core:test
41+
addVersion('org.bouncycastle:bcpkix-jdk15on'),
42+
)
3943
}
4044

4145

webauthn-server-core/build.gradle

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
22
id 'java-library'
3-
id 'java-test-fixtures'
43
id 'scala'
54
id 'info.solidsoft.pitest'
65
}
@@ -25,24 +24,14 @@ dependencies {
2524
addVersion('org.slf4j:slf4j-api'),
2625
)
2726

28-
testFixturesApi(
29-
addVersion('com.augustcellars.cose:cose-java'),
30-
addVersion('org.scala-lang:scala-library'),
31-
addVersion('org.scalacheck:scalacheck_2.13'),
32-
)
33-
34-
testFixturesImplementation(
35-
testFixtures(project(':yubico-util')),
36-
addVersion('com.upokecenter:cbor'),
37-
addVersion('org.bouncycastle:bcpkix-jdk15on'),
38-
)
39-
4027
testImplementation(
41-
testFixtures(project(':yubico-util')),
28+
project(':yubico-util-scala'),
4229
addVersion('com.fasterxml.jackson.datatype:jackson-datatype-jdk8'),
4330
addVersion('junit:junit'),
31+
addVersion('org.bouncycastle:bcpkix-jdk15on'),
4432
addVersion('org.mockito:mockito-core'),
4533
addVersion('org.scala-lang:scala-library'),
34+
addVersion('org.scalacheck:scalacheck_2.13'),
4635
addVersion('org.scalatest:scalatest_2.13'),
4736
)
4837

@@ -77,10 +66,6 @@ jar {
7766
pitest {
7867
pitestVersion = '1.4.11'
7968

80-
// Workaround to an incompatibility issue between Gradle and gradle-pitest
81-
// See https://github.com/szpak/gradle-pitest-plugin/issues/173
82-
testSourceSets.add(sourceSets.main)
83-
8469
timestampedReports = false
8570
outputFormats = ['XML', 'HTML']
8671

@@ -93,6 +78,3 @@ pitest {
9378
]
9479
}
9580

96-
// Workaround to an incompatibility issue between Gradle and gradle-pitest
97-
// See https://github.com/szpak/gradle-pitest-plugin/issues/173
98-
task mainClasses {}

0 commit comments

Comments
 (0)