-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
89 lines (76 loc) · 2.02 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
plugins {
id 'java'
id "com.enonic.xp.app" version "3.2.0"
id 'com.github.node-gradle.node' version '3.2.1'
id "maven-publish"
}
publishing {
publications {
maven(MavenPublication) {
groupId = "${group}"
artifactId = "${projectName}"
version = "${version}"
from components.java
}
}
}
app {
name = project.ext.appName
displayName = project.ext.displayName
vendorName = project.ext.vendorName
vendorUrl = project.ext.vendorUrl
systemVersion = xpVersion
}
group = 'com.github.bouvet-apps'
compileJava.options.encoding = "UTF-8"
task npmBuild(type: NpmTask,
group: 'node',
dependsOn: 'npmInstall',
description: 'Transpile ES6 files'
) {
args = ['run', 'build']
inputs.dir 'src/main/resources'
outputs.dir "$buildDir/resources/main"
}
rootProject.tasks.getByName("processResources").dependsOn npmBuild
task frontend {
dependsOn(':frontend:build')
inputs.dir 'src/frontend/'
outputs.dir "$buildDir/resources/main"
}
rootProject.tasks.getByName("processResources").dependsOn frontend
task deployApp {
dependsOn(':deploy')
group 'application'
description 'Builds server-side components and deploys application'
doLast {
copy {
from "build/libs/${projectName}.jar"
into "dist"
}
}
}
dependencies {
implementation "com.enonic.xp:core-api:${xpVersion}"
implementation "com.enonic.xp:portal-api:${xpVersion}"
include "com.enonic.xp:lib-portal:${xpVersion}"
include "com.enonic.xp:lib-context:${xpVersion}"
include "com.enonic.xp:lib-event:${xpVersion}"
include 'com.enonic.lib:lib-cache:2.2.0'
}
repositories {
mavenLocal()
jcenter()
xp.enonicRepo()
maven { url 'https://repo.enonic.com/public' }
maven { url 'https://jitpack.io' }
}
node {
version = '16.16.0'
npmVersion = '8.11.0'
download = true
}
wrapper {
gradleVersion = '8.3'
distributionType = Wrapper.DistributionType.BIN
}