Skip to content

Commit 417886f

Browse files
author
Sebastian Wilgosz
committed
Added ability to use mavendir as environment variable
1 parent 89d3bbb commit 417886f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (System.getenv('BUILD_NUMBER') != null) {
3131

3232
tasks.withType(JavaCompile) {
3333
options.encoding = 'UTF-8'
34-
}
34+
}
3535

3636
repositories {
3737
mavenCentral()
@@ -55,12 +55,13 @@ artifacts {
5555
}
5656

5757
uploadArchives {
58+
mavendir = System.getenv('MAVENDIR') ?: project.getProperty('mavendir')
5859
onlyIf {
59-
return project.hasProperty('mavendir')
60+
return mavendir
6061
}
6162
repositories {
6263
mavenDeployer {
63-
repository(url: 'file://' + project.getProperty('mavendir'))
64+
repository(url: 'file://' + mavendir)
6465
}
6566
}
6667
}

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
version=1.1.2
1+
version=1.1.2
2+
mavendir=

0 commit comments

Comments
 (0)