Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relast-preprocessor
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
relast-preprocessor
Commits
369fa978
Commit
369fa978
authored
3 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
update build.gradle
parent
848412e5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build.gradle
+54
-36
54 additions, 36 deletions
build.gradle
libs/relast.jar
+0
-0
0 additions, 0 deletions
libs/relast.jar
pages/docs/using.md
+2
-1
2 additions, 1 deletion
pages/docs/using.md
with
56 additions
and
37 deletions
build.gradle
+
54
−
36
View file @
369fa978
...
@@ -4,6 +4,7 @@ plugins {
...
@@ -4,6 +4,7 @@ plugins {
id
'org.jastadd'
id
'org.jastadd'
id
'java'
id
'java'
id
'idea'
id
'idea'
id
'maven-publish'
id
'java-test-fixtures'
id
'java-test-fixtures'
}
}
...
@@ -14,11 +15,19 @@ ext {
...
@@ -14,11 +15,19 @@ ext {
// set the main class name for `gradle run`
// set the main class name for `gradle run`
application
.
mainClassName
=
"${mainClassName}"
application
.
mainClassName
=
"${mainClassName}"
sourceCompatibility
=
1.8
java
.
toolchain
.
languageVersion
=
JavaLanguageVersion
.
of
(
11
)
targetCompatibility
=
1.8
repositories
{
repositories
{
mavenCentral
()
mavenCentral
()
maven
{
name
'gitlab-maven'
url
'https://git-st.inf.tu-dresden.de/api/v4/groups/jastadd/-/packages/maven'
}
}
configurations
{
grammar2uml
relast
}
}
sourceSets
{
sourceSets
{
...
@@ -27,8 +36,17 @@ sourceSets {
...
@@ -27,8 +36,17 @@ sourceSets {
srcDir
"src/gen/java"
srcDir
"src/gen/java"
}
}
}
}
main
{
compileClasspath
+=
sourceSets
.
model
.
output
}
test
{
runtimeClasspath
+=
sourceSets
.
model
.
output
}
}
}
File
genSrc
=
file
(
"src/gen/java"
)
idea
.
module
.
generatedSourceDirs
+=
genSrc
def
versionFile
=
'src/main/resources/preprocessor.properties'
def
versionFile
=
'src/main/resources/preprocessor.properties'
def
versionProps
=
new
Properties
()
def
versionProps
=
new
Properties
()
...
@@ -40,42 +58,20 @@ try {
...
@@ -40,42 +58,20 @@ try {
throw
new
GradleException
(
"File ${versionFile} not found or unreadable. Aborting."
,
e
)
throw
new
GradleException
(
"File ${versionFile} not found or unreadable. Aborting."
,
e
)
}
}
task
fatJar
(
type:
Jar
)
{
group
=
"build"
archiveAppendix
=
"fatjar"
from
sourceSets
.
main
.
output
from
{
configurations
.
runtimeClasspath
.
collect
{
it
.
isDirectory
()
?
it
:
zipTree
(
it
)
}
}
manifest
{
attributes
"Main-Class"
:
"${mainClassName}"
}
}
task
modelJar
(
type:
Jar
)
{
group
=
"build"
archiveAppendix
=
"model"
from
sourceSets
.
model
.
output
}
artifacts
{
archives
modelJar
archives
fatJar
}
dependencies
{
dependencies
{
modelImplementation
group:
'org.jastadd'
,
name:
'jastadd'
,
version:
'2.3.5'
modelImplementation
group:
'net.sf.beaver'
,
name:
'beaver-rt'
,
version:
'0.9.11'
modelImplementation
group:
'net.sf.beaver'
,
name:
'beaver-rt'
,
version:
'0.9.11'
implementation
files
(
modelJar
.
archiveFile
.
get
())
grammar2uml
group:
'de.tudresden.inf.st'
,
name:
'grammar2uml'
,
version:
"${grammar2uml_version}"
relast
group:
'org.jastadd'
,
name:
'relast'
,
version:
"${relast_version}"
api
group:
'org.jastadd'
,
name:
'jastadd'
,
version:
'2.3.5'
api
group:
'org.jastadd'
,
name:
'jastadd'
,
version:
'2.3.5'
api
group:
'net.sf.beaver'
,
name:
'beaver-rt'
,
version:
'0.9.11'
api
group:
'net.sf.beaver'
,
name:
'beaver-rt'
,
version:
'0.9.11'
implementation
group:
'com.github.jknack'
,
name:
'handlebars'
,
version:
'4.3.0'
implementation
group:
'com.github.jknack'
,
name:
'handlebars'
,
version:
'4.3.0'
implementation
group:
'org.yaml'
,
name:
'snakeyaml'
,
version:
'1.27'
implementation
group:
'org.yaml'
,
name:
'snakeyaml'
,
version:
'1.27'
// test
// test
testRuntimeClasspath
files
(
modelJar
.
archiveFile
.
get
())
//
testRuntimeClasspath files(modelJar.archiveFile.get())
// test fixtures
// test fixtures
testFixturesApi
group:
'org.slf4j'
,
name:
'slf4j-jdk14'
,
version:
'1.7.30'
testFixturesApi
group:
'org.slf4j'
,
name:
'slf4j-jdk14'
,
version:
'1.7.30'
...
@@ -110,8 +106,9 @@ def relastOutputFiles = [
...
@@ -110,8 +106,9 @@ def relastOutputFiles = [
]
]
task
relast
(
type:
JavaExec
)
{
task
relast
(
type:
JavaExec
)
{
classpath
=
files
(
"libs/relast.jar"
)
group
=
'Build'
group
=
'Build'
classpath
=
configurations
.
relast
mainClass
=
'org.jastadd.relast.compiler.Compiler'
doFirst
{
doFirst
{
delete
relastOutputFiles
delete
relastOutputFiles
...
@@ -190,12 +187,33 @@ jastadd {
...
@@ -190,12 +187,33 @@ jastadd {
jastaddOptions
=
[
"--lineColumnNumbers"
,
"--List=JastAddList"
,
"--safeLazy"
,
"--visitCheck=true"
,
"--rewrite=cnta"
,
"--cache=all"
]
jastaddOptions
=
[
"--lineColumnNumbers"
,
"--List=JastAddList"
,
"--safeLazy"
,
"--visitCheck=true"
,
"--rewrite=cnta"
,
"--cache=all"
]
}
}
generateAst
.
dependsOn
relast
// publish gitlab project
publishing
{
clean
.
dependsOn
(
cleanGen
)
publications
{
maven
(
MavenPublication
)
{
artifactId
=
'relast'
from
components
.
java
}
}
repositories
{
maven
{
url
"https://git-st.inf.tu-dresden.de/api/v4/projects/$System.env.CI_PROJECT_ID/packages/maven"
// Uncomment the following lines to publish manually (and comment out the other credentials section)
// credentials(HttpHeaderCredentials) {
// name = "Private-Token"
// value = gitLabPrivateToken // the variable resides in ~/.gradle/gradle.properties
// }
credentials
(
HttpHeaderCredentials
)
{
name
=
'Job-Token'
value
=
System
.
getenv
(
'CI_JOB_TOKEN'
)
}
authentication
{
header
(
HttpHeaderAuthentication
)
}
}
modelJar
.
dependsOn
(
generateAst
,
modelClasses
)
}
modelClasses
.
dependsOn
(
generateAst
)
}
compileJava
.
dependsOn
(
modelJar
)
jar
.
dependsOn
(
modelJar
)
generateAst
.
dependsOn
relast
clean
.
dependsOn
cleanGen
This diff is collapsed.
Click to expand it.
libs/relast.jar
deleted
100644 → 0
+
0
−
0
View file @
848412e5
File deleted
This diff is collapsed.
Click to expand it.
pages/docs/using.md
+
2
−
1
View file @
369fa978
...
@@ -44,8 +44,9 @@ def relastOutputFiles = [
...
@@ -44,8 +44,9 @@ def relastOutputFiles = [
]
]
task
relast
(
type:
JavaExec
)
{
task
relast
(
type:
JavaExec
)
{
classpath
=
files
(
"relast.preprocessor/libs/relast.jar"
)
group
=
'Build'
group
=
'Build'
classpath
=
configurations
.
relast
mainClass
=
'org.jastadd.relast.compiler.Compiler'
doFirst
{
doFirst
{
delete
relastOutputFiles
delete
relastOutputFiles
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment