Skip to content

Commit c7b1f0d

Browse files
committed
Update build.gradle
1 parent fa6649b commit c7b1f0d

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ output/
66
.DS_Store
77
.gradle/
88
build/
9+
out/
910
!src/**/build
1011
releasenotes.html

README

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
JobDSL Common Library (JDCL)
2+
3+
4+
Build:
5+
6+
gradle build shadowJar
7+
8+
9+
10+
JFI (testing jobs): https://github.com/unguiculus/job-dsl-sample/blob/master/build.gradle

build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ buildscript {
77
repositories {
88
jcenter()
99
}
10+
1011
dependencies {
1112
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
1213
classpath 'org.ajoberstar:grgit:1.7.0'
1314
}
1415
}
1516

16-
ext {
17-
git = org.ajoberstar.grgit.Grgit.open(file('.'))
18-
}
19-
17+
def git = org.ajoberstar.grgit.Grgit.open(dir: '.')
2018
version = "1.0-${new Date().format('yyyyMMddHHmm')}-${git.head().abbreviatedId}"
2119

2220
repositories {
@@ -25,7 +23,7 @@ repositories {
2523
}
2624

2725
dependencies {
28-
compile(
26+
implementation(
2927
"org.codehaus.groovy:groovy-all:${versions.groovy}",
3028
"org.jenkins-ci.main:jenkins-core:${versions.jenkins}",
3129
"org.eclipse.hudson:hudson-core:${versions.hudson}",
@@ -38,4 +36,4 @@ shadowJar {
3836
dependencies {
3937
include(dependency("org.yaml:snakeyaml:${versions.snakeyaml}@jar"))
4038
}
41-
}
39+
}

src/main/resources/idea.gdsl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// enable DSL support in IDEA, see https://confluence.jetbrains.com/display/GRVY/Scripting+IDE+for+DSL+awareness
2+
3+
def ctx = context(pathRegexp: /.*\/jobs\/.*groovy/)
4+
contributor(ctx, {
5+
delegatesTo(findClass('javaposse.jobdsl.dsl.DslFactory'))
6+
})

0 commit comments

Comments
 (0)