-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
37 lines (31 loc) · 872 Bytes
/
build.gradle
File metadata and controls
37 lines (31 loc) · 872 Bytes
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
import groovy.io.FileType
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
}
apply plugin: 'java-library'
def swaggerList = []
def dir = new File("$rootDir/api-specifications".toString());
if (dir.exists()) {
dir.eachFileRecurse(FileType.FILES) { file ->
if (file.getName().endsWith(".json"))
swaggerList << file
}
} else {
throw new GradleException("Folder api-specifications doesnt exist")
}
if (swaggerList.isEmpty()) {
throw new GradleException("No swaggers found in api-specifications folder")
}
ext {
artifactId = "criteo-client-generator"
groupId = "com.criteo.api"
version = '1.0.0'
description = 'Criteo API Clients Generator'
sourceCompatibility = '1.8'
jar.enabled = false
generatedClientsDirName = 'generated-sources'
swaggerSourceList = swaggerList
}