-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
100 lines (84 loc) · 2.45 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
buildscript {
repositories {
mavenLocal()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url 'http://repo.enonic.com/public'
}
}
dependencies {
classpath "com.enonic.xp:gradle-plugin:${xpVersion}"
classpath "com.moowork.gradle:gradle-node-plugin:1.1.1"
}
}
apply plugin: 'com.enonic.xp.app'
apply plugin: 'com.moowork.node'
apply plugin: 'com.moowork.gulp'
apply plugin: 'maven'
apply plugin: 'idea'
app {
name = project.appName
displayName = project.displayName
vendorName = 'Runar Brastad'
vendorUrl = 'https://github.com/rbrastad'
}
dependencies {
compile "com.enonic.xp:core-api:${xpVersion}"
compile "com.enonic.xp:portal-api:${xpVersion}"
include "com.enonic.xp:lib-content:${xpVersion}"
include "com.enonic.xp:lib-context:${xpVersion}"
include "com.enonic.xp:lib-portal:${xpVersion}"
include "com.enonic.xp:lib-thymeleaf:${xpVersion}"
include "com.enonic.xp:lib-mail:${xpVersion}"
include "com.enonic.xp:lib-auth:${xpVersion}"
include "com.enonic.xp:lib-http-client:${xpVersion}"
include "com.enonic.lib:util:1.1.1"
include "com.enonic.lib:menu:1.1.1"
webjar "org.webjars.npm:react:15.3.2"
webjar "org.webjars.npm:react-dom:15.3.2"
webjar "org.webjars.npm:reactstrap:4.0.1"
}
repositories {
mavenLocal()
jcenter()
maven {
url 'http://repo.enonic.com/public'
}
}
node {
version = '8.9.4'
download = true
}
task dev(type: GulpTask, dependsOn: 'installGulp') {
args = ["--color", "--gulpfile", "gulpfile.js","watch"]
}
task gulp_build(type: GulpTask, dependsOn: 'installGulp') {
description = 'Build for production using gulp'
args = ["--color", "--gulpfile", "gulpfile.js"]
}
task webpack(type: NodeTask) {
script = file('node_modules/webpack/bin/webpack.js')
}
task webpackDev(type: NodeTask) {
script = file('node_modules/webpack/bin/webpack.js')
args = [
"--config",
"webpack-dev.config.js"
]
}
installGulp.dependsOn 'npmInstall'
dev.dependsOn 'build'
build.dependsOn 'gulp_build'
build.mustRunAfter 'gulp_build'
configurations.each {
c -> c.resolutionStrategy.dependencySubstitution {
all { DependencySubstitution dependency ->
if (dependency.requested.group == 'org.webjars.npm') {
dependency.useTarget 'org.webjars.npm:js-tokens:3.0.2'
}
}
}
}