-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
109 lines (92 loc) · 3.08 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
buildscript {
ext {
springBootVersion = '1.5.10.RELEASE'
}
repositories {
mavenCentral()
jcenter()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://plugins.gradle.org/m2/"}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "gradle.plugin.com.greensopinion.gradle-android-eclipse:android-eclipse:1.0"
//classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'de.undercouch:gradle-download-task:3.2.0'
}
}
plugins {
id "org.asciidoctor.convert" version "1.5.3"
id 'net.saliman.cobertura' version '2.3.1'
id 'com.github.kt3k.coveralls' version '2.8.1'
id 'com.github.jruby-gradle.base' version '1.3.3'
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'de.undercouch.download'
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
apply plugin: 'application'
//apply plugin: 'com.android.application'
sourceCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://plugins.gradle.org/m2/"}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.projectlombok:lombok:1.16.14')
compile('org.tensorflow:tensorflow:1.5.0-rc1')
compile('org.tensorflow:tensorflow-android:1.5.0-rc1')
compile('com.google.protobuf:protobuf-java:3.3.1')
compile('commons-io:commons-io:2.5')
compile('jmimemagic:jmimemagic:0.1.2')
compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3'
compile('org.projectlombok:lombok:1.16.20')
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
ext {
snippetsDir = file('build/generated-snippets')
}
asciidoctor {
inputs.dir snippetsDir
dependsOn test
}
test {
outputs.dir snippetsDir
}
task copyRestDocs(type: Copy) {
dependsOn asciidoctor
from "${asciidoctor.outputDir}/html5"
into "${sourceSets.main.output.resourcesDir}/static/docs"
}
jar {
baseName = "inception-serving-sb"
dependsOn copyRestDocs
from("build/asciidoc/html5") {
into 'public/docs'
}
}
bootRun {
dependsOn copyRestDocs
//http://stackoverflow.com/a/31328621/4985623
systemProperties System.properties
}
mainClassName = 'com.newsplore.Application'
import de.undercouch.gradle.tasks.download.Download
task downloadInceptionFrozen(type: Download) {
onlyIfNewer true
//src 'https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz'
dest new File(buildDir, 'inception_v3_2016_08_28_frozen.pb.tar.gz')
}
task fetchInceptionFrozenModel(dependsOn: downloadInceptionFrozen, type: Copy) {
from tarTree(downloadInceptionFrozen.dest)
into 'src/main/resources/inception-v3'
}
build.dependsOn copyRestDocs
cobertura.coverageFormats = ['html', 'xml']