-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (108 loc) · 3.69 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
buildscript {
ext {
kotlinVersion = '1.2.70'
springBootVersion = '2.0.5.RELEASE'
netcdfJavaVersion = '4.6.10'
}
repositories {
mavenCentral()
jcenter()
maven { url "https://repo.spring.io/milestone" }
maven { url 'http://repo.spring.io/plugins-release' }
maven { url 'https://jitpack.io' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath 'org.hidetake:gradle-ssh-plugin:2.9.0'
classpath 'com.github.menny:GradleVersion:0.0.4'
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-spring'
apply plugin: 'idea'
apply plugin: "application"
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.hidetake.ssh'
apply plugin: 'net.evendanan.versiongenerator'
group = 'org.earthstartsbeating'
sourceCompatibility = 1.8
mainClassName = 'org.esb.tools.EsbToolsKt'
def generators = [
new net.evendanan.versiongenerator.generators.GitBuildVersionGenerator(0, 0),
]
def versionData = versionGenerator.generateVersion(1, 0, 0, generators)
remotes {
esb {
host = '51.38.225.223'
port = 8080
user = 'centos'
identity = file("${System.properties['user.home']}/.ssh/serco-esb_rsa")
}
}
task('deploy', dependsOn: bootJar) {
doLast {
println "Pushing to DIAS..."
ssh.run {
session(remotes.esb) {
put from: bootJar.archivePath.path, into: '/home/centos/fernando'
execute 'sudo chmod +x /home/centos/fernando/*.jar'
}
}
}
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/libs-milestone' }
maven { url "https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases/" }
}
dependencies {
// spring
compile "org.springframework:spring-web"
compileOnly('org.springframework.boot:spring-boot-configuration-processor')
compile 'org.springframework.shell:spring-shell-starter:2.0.0.RELEASE'
runtime 'org.springframework.boot:spring-boot-devtools'
kapt "org.springframework.boot:spring-boot-configuration-processor"
// optional "org.springframework.boot:spring-boot-configuration-processor"
// kotlin
compile "com.fasterxml.jackson.module:jackson-module-kotlin"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}"
compile "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
// GEO
compile 'com.esri.geometry:esri-geometry-api:2.0.0'
compile "edu.ucar:cdm:${netcdfJavaVersion}"
compile 'org.gdal:gdal:2.3.0'
// utils
compile 'commons-io:commons-io:2.6'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
// test
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile 'io.projectreactor:reactor-test'
}
bootJar {
launchScript {
properties 'inlinedConfScript': 'esb.sh'
}
println "Building Copernicus ESB Tools ${versionData.versionName} (or ${project.version}), code ${versionData.versionCode}."
// comment out the following line if you do not want automatic deployment on dias!!
// finalizedBy deploy
}
springBoot {
buildInfo ()
}