-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
75 lines (64 loc) · 1.79 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*******************************************************************************
*
* MIT License
* Copyright (c) 2015-2016 NetIQ Corporation, a Micro Focus company
*
******************************************************************************/
defaultTasks 'build'
buildscript {
repositories {
mavenCentral()
maven {
url 'http://oss.sonatype.org/content/groups/public'
}
}
dependencies {
classpath 'com.grossbart:forbidden_function:0.1'
classpath 'org.spiffyui:spiffyuitasks:1.6'
}
}
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven'
group = 'org.gromitsoft'
version = '1.0.5-SNAPSHOT'
repositories {
mavenCentral()
maven {
url 'http://oss.sonatype.org/content/groups/public'
}
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.spiffyui:spiffyuitasks:1.6'
compile 'com.grossbart:forbidden_function:0.1'
}
artifacts {
archives jar
}
// upload plugin to nexus
uploadArchives {
description = 'This task uploads gromit plugin artifacts to the Nexus server.'
if (project.hasProperty('envDeployUser')) {
repositories {
mavenDeployer {
repository(url: "http://nexus.idmapps.nqbuild.lab/nexus/content/repositories/snapshots") {
authentication(userName: envDeployUser, password: envDeployPass)
}
}
}
}
}
uploadArchives.doFirst {
println 'check authentication properties'
if (!project.hasProperty('envDeployUser')) {
throw new GradleScriptException("You need to set up the gradle.properties file before you can deploy. Look at gradle.properties.sample.", null);
}
}
jar {
baseName "gromit-plugin"
}
build.doLast {
tasks.install.execute()
}