Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ProB Rodin Plugin
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
ProB Rodin Plugin
Commits
19cb64ed
Commit
19cb64ed
authored
Aug 14, 2012
by
birkhoff
Browse files
Options
Downloads
Patches
Plain Diff
fixed classpath task Please DO NOT RUN GRADLE ECLIPSE!
parent
267d647a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tycho_build.gradle
+59
-11
59 additions, 11 deletions
tycho_build.gradle
with
59 additions
and
11 deletions
tycho_build.gradle
+
59
−
11
View file @
19cb64ed
...
@@ -128,8 +128,36 @@ def groupId(){
...
@@ -128,8 +128,36 @@ def groupId(){
* This Group ID will be used in every sub project
* This Group ID will be used in every sub project
*/
*/
def
addLibToCP
(
def
project
,
File
filePar
,
def
libPar
){
boolean
notYetAdded
=
true
filePar
.
eachLine
{
line
->
def
pattern
=
".*${dependencyFolder}${libPar}.*"
if
(
line
==~
/${pattern}/
){
notYetAdded
=
false
}
}
if
(
notYetAdded
){
File
newCP
=
new
File
(
project
+
'/.cp'
)
filePar
.
eachLine
{
line
->
if
(
line
==~
/.*<\/classpath>.*/
){
String
entry
=
'<classpathentry exported="true" kind="lib" path="lib/dependencies/'
+
libPar
+
'"/>'
+
'\n</classpath>\n'
line
=
line
.
replaceAll
(
/<\/classpath>/
,
entry
)
println
line
newCP
<<
line
+
"\n"
}
else
{
newCP
<<
line
+
"\n"
}
}
filePar
.
delete
()
newCP
.
renameTo
(
project
+
'/.classpath'
)
}
else
{
println
project
+
" : "
+
libPar
+
" classpath entry already present"
}
}
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
// -- !!! DEFINING SUB PROJECTS !!! -- //
// -- !!! DEFINING SUB PROJECTS !!! -- //
...
@@ -155,17 +183,37 @@ subprojects {
...
@@ -155,17 +183,37 @@ subprojects {
}
}
eclipse
{
task
setClassPath
(
dependsOn:
'collectDependencies'
)
{
classpath
{
def
dependencyList
=
[]
//adding extra configurations:
try
{
plusConfigurations
+=
configurations
.
compile
def
dir
=
new
File
(
project
.
name
+
"/"
+
dependencyFolder
).
eachFile
()
{
file
->
dependencyList
<<
file
.
getName
()
}
if
(
features
.
every
{
it
!=
project
.
name
}){
def
cpFile
=
new
File
(
project
.
name
+
"/.classpath"
)
for
(
int
icp
=
0
;
icp
<
dependencyList
.
size
;
icp
++){
addLibToCP
(
project
.
name
,
cpFile
,
dependencyList
[
icp
])
}
/*dependencyList.each{ dep->
println project.name+": "+ dep
}*/
//default settings for dependencies sources/javadoc download:
downloadSources
=
true
downloadJavadoc
=
false
}
}
}
catch
(
Exception
e
){
println
project
.
name
+
" has no dependencies in '${dependencyFolder}' defined: Classpath will not be changed"
}
}
}
// setClassPath
eclipse
.
classpath
.
file
{
whenMerged
{
classpath
->
classpath
.
entries
.
findAll
{
entry
->
entry
.
kind
==
'lib'
}*.
exported
=
true
}
}
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
task
deploy
()
<<{
task
deploy
()
<<{
...
...
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