-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (63 loc) · 2.17 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
group 'com.coretex.core'
version '1.0-Beta'
buildscript {
repositories {
mavenCentral()
// mavenLocal()
jcenter()
maven { url "http://repo.coretexplatform.com/artifactory/coretex_repo-libs-release/"}
maven { url "https://repo.spring.io/milestone" }
maven { url 'https://jitpack.io' }
maven { url "https://repo.spring.io/libs-release-remote" }
maven { url "https://jetbrains.bintray.com/trove4j/" }
}
dependencies {
classpath(group: 'com.coretex.build.plugin', name: 'build.plugin', version: '1.1-Beta')
classpath(group: 'com.bmuschko', name: 'gradle-docker-plugin', version: '6.6.1')
}
}
wrapper {
gradleVersion = '6.8.2'
}
apply plugin: 'distribution'
apply from: "gradle-build/config.gradle"
apply plugin: 'build.plugin'
apply from: "gradle-build/subprojects.gradle"
apply plugin: 'com.bmuschko.docker-remote-api'
distributions {
main {
distributionBaseName = 'gm-commerce'
contents {
from projectDir
exclude '**/src'
exclude 'tmp'
exclude '**/*.iml'
exclude '**/.idea'
exclude '**/.gradle'
exclude '**/node_modules'
exclude '**/jsbuild'
exclude '**/webSrc'
exclude '**/commerce_shop/template'
exclude '**/genSrc'
exclude 'build'
exclude 'data'
}
}
}
//distTar.enabled = false
//distZip.enabled = false
import com.bmuschko.gradle.docker.tasks.image.*
task createDockerfile(type: Dockerfile, dependsOn: distTar) {
destFile.set(project.layout.buildDirectory.file('distributions/Dockerfile'))
from('openjdk:15')
addFile("gm-commerce-1.0-Alpha.tar", "/opt/coretex/")
workingDir("/opt/coretex/gm-commerce-1.0-Alpha")
environmentVariable('JAVA_OPTS', '-Djava.awt.headless=true -server -Xms48m -Xmx512M -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/tmp/heapdump.bin')
exposePort(8080)
}
//
task buildImage(type: DockerBuildImage) {
dependsOn createDockerfile
inputDir = file(createDockerfile.destFile).parentFile
images.add('gerasimenkoart/coretex_commerce:latest')
}