-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (85 loc) · 3.27 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
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/3.4/userguide/java_library_plugin.html
*/
// Apply the java-library plugin to add support for Java Library
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:1.0.15'
classpath 'com.moowork.gradle:gradle-node-plugin:0.13'
}
}
plugins {
id 'com.moowork.node' version '0.13'
id 'net.researchgate.release' version '2.4.0'
}
node {
version = '7.9.0'
npmVersion = '5.5.1'
download = true
}
// Configuration for Xtext projects
configure(subprojects.findAll { it.name.startsWith('com.tool') }) {
ext.xtextVersion = '2.13.0'
repositories {
maven { url 'http://services.typefox.io/open-source/jenkins/job/lsp4j/job/release_0.1.1/lastSuccessfulBuild/artifact/build/maven-repository/' }
maven { url 'http://services.typefox.io/open-source/jenkins/job/lsp4j/job/master/lastSuccessfulBuild/artifact/build/maven-repository/' }
maven { url 'http://services.typefox.io/open-source/jenkins/job/xtext-lib/job/master/lastStableBuild/artifact/build/maven-repository/' }
maven { url 'http://services.typefox.io/open-source/jenkins/job/xtext-core/job/master/lastStableBuild/artifact/build/maven-repository/' }
maven { url 'http://services.typefox.io/open-source/jenkins/job/xtext-extras/job/master/lastStableBuild/artifact/build/maven-repository/' }
maven { url 'http://services.typefox.io/open-source/jenkins/job/xtext-xtend/job/master/lastStableBuild/artifact/build/maven-repository/' }
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
jcenter()
}
apply plugin: 'java'
apply plugin: 'org.xtext.xtend'
apply from: "${rootDir}/gradle/source-layout.gradle"
apply from: "${rootDir}/gradle/maven-deployment.gradle"
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'com.tool.small.mydsl'
version = '1.0.0-SNAPSHOT'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
configurations.all {
exclude group: 'asm'
}
}
// Workaround for issue https://github.com/researchgate/gradle-release/issues/144
task build {
dependsOn subprojects.findResults { it.tasks.findByName('build') }
}
task npmInstallVsce(type: NpmTask, dependsOn: npmSetup) {
ext.destPath = "$rootProject.projectDir/node_modules/vsce"
outputs.dir(destPath)
group 'Node'
description 'Installs the NodeJS package "Visual Studio Code Extension Manager"'
args = [ 'install', 'vsce' ]
}
// Configuration for vscode projects
configure(subprojects.findAll { it.name.startsWith('mydsl') }) {
apply plugin: 'com.moowork.node'
def inputFiles = fileTree(
dir: projectDir,
excludes: [ 'out/**', '.gitignore', '.gradle/**', 'build/**', '*.gradle' ]
)
npmInstall {
inputs.files(inputFiles)
outputs.dir('out')
}
npmInstallVsce.dependsOn npmInstall
build.dependsOn npmInstallVsce
task clean {
doLast {
delete 'out' // output of npmInstall - don't want to delete node_modules
}
}
}