-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (59 loc) · 2.23 KB
/
build.gradle
File metadata and controls
71 lines (59 loc) · 2.23 KB
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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java library project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.8.3/userguide/building_java_projects.html
*/
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
// Swagger codegen
id 'org.hidetake.swagger.generator' version '2.18.2'
}
repositories {
// Use JCenter for resolving dependencies.
jcenter()
}
apply plugin: 'maven'
group = 'com.github.semuxproject'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
dependencies {
swaggerCodegen 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.25'
implementation 'io.swagger.core.v3:swagger-annotations:2.0.0'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation 'com.squareup.okhttp:logging-interceptor:2.7.5'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'io.gsonfire:gson-fire:1.8.3'
implementation 'org.threeten:threetenbp:1.3.5'
implementation 'org.bouncycastle:bcprov-jdk15on:1.68'
implementation 'net.i2p.crypto:eddsa:0.3.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.12.3'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
tasks.named('test') {
// Use junit platform for unit tests.
useJUnitPlatform()
}
swaggerSources {
semux {
inputFile = file('./semux-core/src/main/resources/org/semux/api/swagger/v2.5.0.yml')
code {
language = 'java'
configFile = file('./swagger.json')
doLast {
copySrcAndDocs {}
}
}
}
}
compileJava.dependsOn swaggerSources.semux.code
sourceSets.main.java.srcDir "${swaggerSources.semux.code.outputDir}/src/main/java"
sourceSets.main.resources.srcDir "${swaggerSources.semux.code.outputDir}/src/main/resources"
task copySwaggerDocs(type: Copy) {
from './build/swagger-code-semux/docs'
into './docs'
}