Skip to content

Commit c4560b4

Browse files
committed
Merge branch 'develop'
2 parents 613fe86 + 67754d6 commit c4560b4

File tree

80 files changed

+15333
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+15333
-165
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Set up JDK 11
15+
- name: Set up JDK
1616
uses: actions/setup-java@v3
1717
with:
1818
java-version: '17'

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
/.launch/
22
/.gradle/
33
/com.minres.coredsl.mwe/
4+
/*.core_desc
5+
/package-lock.json
6+
/package.json
7+
/build/
8+
/node_modules/

.project

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>com.minres.coredsl.parent</name>
3+
<name>CoreDSL</name>
44
<comment></comment>
55
<projects>
66
</projects>
@@ -20,4 +20,15 @@
2020
<nature>org.eclipse.m2e.core.maven2Nature</nature>
2121
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
2222
</natures>
23+
<filteredResources>
24+
<filter>
25+
<id>1707073375452</id>
26+
<name></name>
27+
<type>30</type>
28+
<matcher>
29+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31+
</matcher>
32+
</filter>
33+
</filteredResources>
2334
</projectDescription>

.settings/org.eclipse.buildship.core.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ arguments=
22
auto.sync=false
33
build.scans.enabled=false
44
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5-
connection.project.dir=
5+
connection.project.dir=vscode-extension-self-contained
66
eclipse.preferences.version=1
77
gradle.user.home=
88
java.home=

build.gradle

Lines changed: 120 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,29 @@ buildscript {
22
repositories {
33
mavenCentral()
44
gradlePluginPortal()
5+
maven {
6+
url "https://plugins.gradle.org/m2/"
7+
}
58
}
69
dependencies {
710
classpath 'org.xtext:xtext-gradle-plugin:4.0.0'
11+
classpath 'com.github.node-gradle:gradle-node-plugin:3.3.0'
12+
classpath 'net.researchgate:gradle-release:2.8.1'
813
}
914
}
1015

11-
subprojects {
16+
apply plugin: 'com.github.node-gradle.node'
17+
apply plugin: 'net.researchgate.release'
18+
node {
19+
version = '16.13.2'
20+
npmVersion = '8.3.0'
21+
download = true
22+
}
23+
24+
tasks.named("npmInstall").configure { enabled = false }
25+
26+
// Configuration for Xtext projects
27+
configure(subprojects.findAll { it.name.startsWith('com.minres') }) {
1228
ext.xtextVersion = '2.33.0'
1329
repositories {
1430
mavenCentral()
@@ -22,16 +38,116 @@ subprojects {
2238
apply plugin: 'org.xtext.xtend'
2339
apply from: "${rootDir}/gradle/source-layout.gradle"
2440
apply plugin: 'eclipse'
25-
41+
2642
group = 'com.minres.coredsl'
27-
version = '2.0.12-SNAPSHOT'
43+
version = '2.0.12'
2844

2945
java {
3046
sourceCompatibility = JavaVersion.VERSION_17
3147
targetCompatibility = JavaVersion.VERSION_17
3248
}
33-
49+
3450
configurations.all {
3551
exclude group: 'asm'
3652
}
53+
54+
}
55+
56+
task npmInstallVsce(type: NpmTask, dependsOn: npmSetup) {
57+
ext.destPath = "$rootProject.projectDir/node_modules/vsce"
58+
outputs.dir(destPath)
59+
group 'Node'
60+
description 'Installs the NodeJS package "Visual Studio Code Extension Manager"'
61+
args = [ 'install', 'vsce' ]
62+
}
63+
64+
// Configuration for vscode projects
65+
configure(subprojects.findAll { it.name.startsWith('vscode') }) {
66+
67+
apply plugin: 'com.github.node-gradle.node'
68+
node {
69+
version = '16.13.2'
70+
npmVersion = '8.3.0'
71+
download = true
72+
}
73+
74+
version = '2.0.12'
75+
76+
def inputFiles = fileTree(
77+
dir: projectDir,
78+
excludes: [ 'out/**', '.gitignore', '.gradle/**', 'build/**', '*.gradle' ]
79+
)
80+
81+
npmInstall {
82+
inputs.files(inputFiles)
83+
outputs.dir('out')
84+
}
85+
86+
task vscodeExtension(dependsOn: [npmInstall, npmInstallVsce], type: NodeTask) {
87+
ext.destDir = new File(buildDir, 'vscode')
88+
ext.archiveName = "coredsl-vscode-${project.version}.vsix"
89+
ext.destPath = "$destDir/$archiveName"
90+
inputs.with {
91+
files inputFiles
92+
dir npmInstallVsce.destPath
93+
}
94+
outputs.dir destDir
95+
doFirst {
96+
destDir.mkdirs()
97+
}
98+
script = file("$npmInstallVsce.destPath/vsce")
99+
args = [ 'package', '--out', destPath ]
100+
execOverrides {
101+
workingDir = projectDir
102+
}
103+
}
104+
105+
task clean {
106+
doLast {
107+
delete vscodeExtension.destDir
108+
delete 'out' // output of npmInstall - don't want to delete node_modules
109+
}
110+
111+
}
112+
113+
}
114+
115+
plugins.withType(com.github.gradle.node.NodePlugin) {
116+
node {
117+
workDir = file("$rootProject.buildDir/nodejs")
118+
nodeModulesDir = rootProject.projectDir
119+
}
120+
}
121+
122+
updateVersion {
123+
doLast {
124+
// custom code
125+
def versionPattern = /\d+.\d+(.\d+)?/
126+
def encoding = 'UTF-8'
127+
def filesToUpdate = [
128+
new File('vscode-extension', 'package.json'),
129+
new File('vscode-extension-self-contained', 'package.json'),
130+
]
131+
132+
// String replacements - isn't long enough to justify advanced code ;)
133+
filesToUpdate.forEach { file ->
134+
135+
String text = file.getText(encoding)
136+
text = text.replaceAll("\"version\": \"$versionPattern\",", "\"version\": \"$project.version\",")
137+
file.setText(text, encoding)
138+
}
139+
}
140+
}
141+
142+
release {
143+
tagTemplate = 'v${version}'
144+
preTagCommitMessage = '[release] pre tag commit: '
145+
tagCommitMessage = '[release] creating tag: '
146+
newVersionCommitMessage = '[release] new version commit: '
147+
failOnSnapshotDependencies = false
148+
}
149+
150+
// Workaround for issue https://github.com/researchgate/gradle-release/issues/144
151+
task build {
152+
dependsOn subprojects.findResults { it.tasks.findByName('build') }
37153
}

com.minres.coredsl.feature/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<feature id="com.minres.coredsl.feature"
33
label="CoreDsl Feature "
4-
version="2.0.12">
4+
version="2.0.14">
55
<plugin
66
id="com.minres.coredsl"
77
download-size="0"

com.minres.coredsl.feature/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.minres.coredsl</groupId>
66
<artifactId>com.minres.coredsl.parent</artifactId>
7-
<version>2.0.12</version>
7+
<version>2.0.14</version>
88
</parent>
99
<artifactId>com.minres.coredsl.feature</artifactId>
1010
<packaging>eclipse-feature</packaging>

com.minres.coredsl.ide/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
<attribute name="module" value="true"/>
2424
</attributes>
2525
</classpathentry>
26-
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
26+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
2727
<classpathentry kind="output" path="target/classes"/>
2828
</classpath>

com.minres.coredsl.ide/.project

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,15 @@
4343
<nature>org.eclipse.jdt.core.javanature</nature>
4444
<nature>org.eclipse.pde.PluginNature</nature>
4545
</natures>
46+
<filteredResources>
47+
<filter>
48+
<id>1707073375461</id>
49+
<name></name>
50+
<type>30</type>
51+
<matcher>
52+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
53+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
54+
</matcher>
55+
</filter>
56+
</filteredResources>
4657
</projectDescription>

com.minres.coredsl.ide/.settings/org.eclipse.buildship.core.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
33
connection.gradle.user.home=null
44
connection.java.home=null
55
connection.jvm.arguments=
6-
connection.project.dir=..
6+
connection.project.dir=../vscode-extension-self-contained
77
eclipse.preferences.version=1
88
project.path=\:com.minres.coredsl.ide

0 commit comments

Comments
 (0)