This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
88 lines (72 loc) · 2.3 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* Copyright (c) 2021 Ubique Innovation AG <https://www.ubique.ch>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
id 'org.jetbrains.kotlin.kapt' version '1.6.10'
id 'com.vanniktech.maven.publish' version '0.17.0'
}
group GROUP
version VERSION_NAME
repositories {
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
dependencies {
// Kotlin coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
// Security
implementation "com.augustcellars.cose:cose-java:1.1.0"
implementation 'org.bouncycastle:bcprov-jdk15on:1.69'
// IO
implementation 'com.squareup.okio:okio:2.10.0'
// (De-)Serialization
implementation 'com.squareup.moshi:moshi:1.13.0'
implementation 'com.squareup.moshi:moshi-adapters:1.13.0'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.13.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
// Unit testing
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
testImplementation 'com.squareup.moshi:moshi:1.13.0'
testImplementation 'com.squareup.moshi:moshi-adapters:1.13.0'
kaptTest 'com.squareup.moshi:moshi-kotlin-codegen:1.13.0'
}
test {
useJUnitPlatform()
}
mavenPublish {
sonatypeHost = "S01"
}
tasks.register("downloadNationalRules") {
doLast {
println("Downloading latest national rules before running unit tests")
def url = "https://www.cc-d.bit.admin.ch/trust/v2/verificationRules"
def outputFile = "src/test/resources/nationalrules.json"
exec {
executable "sh"
args "-c", "curl ${url} | jq > ${outputFile}"
}
}
}
test.dependsOn downloadNationalRules