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
4b4b7798
Commit
4b4b7798
authored
3 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
fix jar generation of derived projects
parent
f00da960
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build.gradle
+26
-20
26 additions, 20 deletions
build.gradle
with
26 additions
and
20 deletions
build.gradle
+
26
−
20
View file @
4b4b7798
...
...
@@ -29,15 +29,38 @@ sourceSets {
}
}
def
versionFile
=
'src/main/resources/preprocessor.properties'
def
versionProps
=
new
Properties
()
try
{
file
(
versionFile
).
withInputStream
{
stream
->
versionProps
.
load
(
stream
)
}
version
=
versionProps
[
'version'
]
}
catch
(
e
)
{
// this happens, if either the properties file is not present, or cannot be read from
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"
archiveBaseName
=
'model'
archiveVersion
=
''
archiveAppendix
=
"model"
from
sourceSets
.
model
.
output
}
artifacts
{
archives
modelJar
archives
fatJar
}
dependencies
{
...
...
@@ -64,25 +87,8 @@ dependencies {
testFixturesApi
group:
'commons-io'
,
name:
'commons-io'
,
version:
'2.8.0'
}
def
versionFile
=
'src/main/resources/preprocessor.properties'
def
versionProps
=
new
Properties
()
try
{
file
(
versionFile
).
withInputStream
{
stream
->
versionProps
.
load
(
stream
)
}
version
=
versionProps
[
'version'
]
}
catch
(
e
)
{
// this happens, if either the properties file is not present, or cannot be read from
throw
new
GradleException
(
"File ${versionFile} not found or unreadable. Aborting."
,
e
)
}
jar
{
manifest
{
attributes
"Main-Class"
:
"${mainClassName}"
}
from
{
configurations
.
runtimeClasspath
.
collect
{
it
.
isDirectory
()
?
it
:
zipTree
(
it
)
}
}
archiveAppendix
=
"base"
}
test
{
...
...
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