-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (95 loc) · 3.41 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
plugins {
id 'java-library'
id 'maven-publish'
id "org.hidetake.swagger.generator" version "2.19.2"
id "com.vanniktech.maven.publish" version "0.20.0"
id "org.owasp.dependencycheck" version "7.1.1"
}
java {
sourceCompatibility = 8
targetCompatibility = 8
}
group 'com.hopper.cloud'
version '1.4.3'
ext.artifactId = 'cloud-airlines-java'
repositories {
mavenCentral()
}
dependencies {
swaggerCodegen 'org.openapitools:openapi-generator-cli:7.8.0'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'io.swagger:swagger-annotations:1.6.14'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
implementation 'com.squareup.okio:okio:3.9.0'
implementation 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2'
implementation 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.common:1.0.2'
implementation 'io.gsonfire:gson-fire:1.9.0'
implementation 'com.github.spotbugs:spotbugs-annotations:4.8.6'
implementation 'com.konghq:unirest-java:3.14.5'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
implementation 'org.slf4j:slf4j-jdk14:1.7.5'
}
task printVersionName {
doLast {
println "version=$version"
}
}
task incrementMinorVersion {
group "Custom task"
description "Increment the Minor number"
doLast {
String[] versionDetail = version.split('\\.')
String minor = (versionDetail[1].toInteger() + 1).toString() + "."
String major = versionDetail[0] + "."
String patch = "0"
String s = buildFile.getText().replaceFirst("version '$version'", "version '" + major + minor + patch + "'")
buildFile.setText(s)
}
}
task incrementPatchVersion {
group "Custom task"
description "Increment the Patch number"
doLast {
String[] versionDetail = version.split('\\.')
String minor = versionDetail[1] + "."
String major = versionDetail[0] + "."
String patch = (versionDetail[2].toInteger() + 1).toString()
String s = buildFile.getText().replaceFirst("version '$version'", "version '" + major + minor + patch + "'")
buildFile.setText(s)
}
}
task incrementMajorVersion {
group "Custom task"
description "Increment the Major number"
doLast {
String[] versionDetail = version.split('\\.')
String minor = "0."
String major = (versionDetail[0].toInteger() + 1).toString() + "."
String patch = "0"
String s = buildFile.getText().replaceFirst("version '$version'", "version '" + major + minor + patch + "'")
buildFile.setText(s)
}
}
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module('com.google.code.gson:gson:2.8.6') using module('com.google.code.gson:gson:2.9.0')
}
}
/*
swaggerSources {
hcap {
inputFile = file('hcap.yml')
code {
language = 'java'
configFile = file('config.json')
dependsOn validation
}
}
}
// Configure compile task dependency and source
compileJava.dependsOn swaggerSources.hcap.code
sourceSets.main.java.srcDir "${swaggerSources.hcap.code.outputDir}/src/main/java"
sourceSets.main.resources.srcDir "${swaggerSources.hcap.code.outputDir}/src/main/resources"*/