|
| 1 | +import com.yubico.gradle.GitUtils; |
| 2 | +plugins { |
| 3 | + `java-library` |
| 4 | + scala |
| 5 | + `maven-publish` |
| 6 | + signing |
| 7 | + id("com.diffplug.spotless") |
| 8 | + id("info.solidsoft.pitest") |
| 9 | + id("io.github.cosmicsilence.scalafix") |
| 10 | +} |
| 11 | + |
| 12 | +description = "Yubico WebAuthn server core API" |
| 13 | + |
| 14 | +val publishMe by extra(true) |
| 15 | + |
| 16 | +java { |
| 17 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 18 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 19 | +} |
| 20 | + |
| 21 | +dependencies { |
| 22 | + api(platform(rootProject)) |
| 23 | + |
| 24 | + api(project(":yubico-util")) |
| 25 | + |
| 26 | + implementation("com.augustcellars.cose:cose-java") |
| 27 | + implementation("com.fasterxml.jackson.core:jackson-databind") |
| 28 | + implementation("com.google.guava:guava") |
| 29 | + implementation("com.upokecenter:cbor") |
| 30 | + implementation("org.apache.httpcomponents:httpclient") |
| 31 | + implementation("org.slf4j:slf4j-api") |
| 32 | + |
| 33 | + testImplementation(platform(project(":test-platform"))) |
| 34 | + testImplementation(project(":yubico-util-scala")) |
| 35 | + testImplementation("com.fasterxml.jackson.core:jackson-databind") |
| 36 | + testImplementation("com.upokecenter:cbor") |
| 37 | + testImplementation("junit:junit") |
| 38 | + testImplementation("org.bouncycastle:bcpkix-jdk15on") |
| 39 | + testImplementation("org.bouncycastle:bcprov-jdk15on") |
| 40 | + testImplementation("org.mockito:mockito-core") |
| 41 | + testImplementation("org.scala-lang:scala-library") |
| 42 | + testImplementation("org.scalacheck:scalacheck_2.13") |
| 43 | + testImplementation("org.scalatest:scalatest_2.13") |
| 44 | + testImplementation("uk.org.lidalia:slf4j-test") |
| 45 | + |
| 46 | + testImplementation("org.slf4j:slf4j-api") { |
| 47 | + version { |
| 48 | + strictly("[1.7.25,1.8-a)") // Pre-1.8 version required by slf4j-test |
| 49 | + } |
| 50 | + } |
| 51 | +} |
| 52 | + |
| 53 | +tasks.jar { |
| 54 | + manifest { |
| 55 | + attributes(mapOf( |
| 56 | + "Specification-Title" to "Web Authentication: An API for accessing Public Key Credentials", |
| 57 | + "Specification-Version" to "Level 2 Proposed Recommendation 2021-04-08", |
| 58 | + "Specification-Vendor" to "World Wide Web Consortium", |
| 59 | + |
| 60 | + "Specification-Url" to "https://www.w3.org/TR/2021/REC-webauthn-2-20210408/", |
| 61 | + "Specification-Url-Latest" to "https://www.w3.org/TR/webauthn-2/", |
| 62 | + "Specification-W3c-Status" to "recommendation", |
| 63 | + "Specification-Release-Date" to "2021-04-08", |
| 64 | + |
| 65 | + "Implementation-Id" to "java-webauthn-server", |
| 66 | + "Implementation-Title" to "Yubico Web Authentication server library", |
| 67 | + "Implementation-Version" to project.version, |
| 68 | + "Implementation-Vendor" to "Yubico", |
| 69 | + "Implementation-Source-Url" to "https://github.com/Yubico/java-webauthn-server", |
| 70 | + "Git-Commit" to com.yubico.gradle.GitUtils.getGitCommitOrUnknown(projectDir), |
| 71 | + )) |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +pitest { |
| 76 | + pitestVersion.set("1.4.11") |
| 77 | + timestampedReports.set(false) |
| 78 | + |
| 79 | + outputFormats.set(listOf("XML", "HTML")) |
| 80 | + |
| 81 | + avoidCallsTo.set(listOf( |
| 82 | + "java.util.logging", |
| 83 | + "org.apache.log4j", |
| 84 | + "org.slf4j", |
| 85 | + "org.apache.commons.logging", |
| 86 | + "com.google.common.io.Closeables", |
| 87 | + )) |
| 88 | +} |
0 commit comments