|
| 1 | +plugins { |
| 2 | + java |
| 3 | + war |
| 4 | + application |
| 5 | + scala |
| 6 | + id("com.diffplug.spotless") |
| 7 | + id("io.github.cosmicsilence.scalafix") |
| 8 | +} |
| 9 | + |
| 10 | +description = "WebAuthn demo" |
| 11 | + |
| 12 | +// Can't use test fixtures because they interfere with pitest: https://github.com/gradle/gradle/issues/12168 |
| 13 | +evaluationDependsOn(":webauthn-server-core") |
| 14 | +val coreTestsOutput = project(":webauthn-server-core").extensions.getByType(SourceSetContainer::class).test.get().output |
| 15 | + |
| 16 | +dependencies { |
| 17 | + implementation(platform(rootProject)) |
| 18 | + |
| 19 | + implementation(project(":webauthn-server-attestation")) |
| 20 | + implementation(project(":webauthn-server-core")) |
| 21 | + implementation(project(":yubico-util")) |
| 22 | + |
| 23 | + implementation("com.fasterxml.jackson.core:jackson-databind") |
| 24 | + implementation("com.google.guava:guava") |
| 25 | + implementation("com.upokecenter:cbor") |
| 26 | + implementation("org.bouncycastle:bcprov-jdk15on") |
| 27 | + implementation("org.slf4j:slf4j-api") |
| 28 | + |
| 29 | + implementation("org.eclipse.jetty:jetty-servlet:9.4.9.v20180320") |
| 30 | + implementation("org.glassfish.jersey.containers:jersey-container-servlet-core:2.36") |
| 31 | + implementation("javax.ws.rs:javax.ws.rs-api:2.1.1") |
| 32 | + |
| 33 | + runtimeOnly("ch.qos.logback:logback-classic:1.3.0") |
| 34 | + runtimeOnly("org.glassfish.jersey.containers:jersey-container-servlet:2.36") |
| 35 | + runtimeOnly("org.glassfish.jersey.inject:jersey-hk2:2.36") |
| 36 | + |
| 37 | + testImplementation(platform(project(":test-platform"))) |
| 38 | + testImplementation(coreTestsOutput) |
| 39 | + testImplementation(project(":yubico-util-scala")) |
| 40 | + |
| 41 | + testImplementation("junit:junit") |
| 42 | + testImplementation("org.mockito:mockito-core") |
| 43 | + testImplementation("org.scala-lang:scala-library") |
| 44 | + testImplementation("org.scalacheck:scalacheck_2.13") |
| 45 | + testImplementation("org.scalatest:scalatest_2.13") |
| 46 | + |
| 47 | + modules { |
| 48 | + module("javax.servlet:servlet-api") { |
| 49 | + replacedBy("javax.servlet:javax.servlet-api") |
| 50 | + } |
| 51 | + } |
| 52 | +} |
| 53 | + |
| 54 | +application { |
| 55 | + mainClass.set("demo.webauthn.EmbeddedServer") |
| 56 | +} |
| 57 | + |
| 58 | +for (task in listOf(tasks.installDist, tasks.distZip, tasks.distTar)) { |
| 59 | + val intoDir = if (task == tasks.installDist) { "/" } else { "${project.name}-${project.version}" } |
| 60 | + task { |
| 61 | + into(intoDir) { |
| 62 | + from("keystore.jks") |
| 63 | + from("src/main/webapp") { |
| 64 | + into("src/main/webapp") |
| 65 | + } |
| 66 | + } |
| 67 | + } |
| 68 | +} |
0 commit comments