-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
94 lines (77 loc) · 2.31 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
plugins {
id "com.jfrog.bintray" version "1.8.0"
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'distribution'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
def MAGIC_DRAW_DIR = System.getenv('MAGIC_DRAW_INSTLLATION_DIR')
repositories {
mavenCentral()
}
def projectName = 'webpackStats2MagicDraw'
def projectDescription = ''
def projectHomePage = 'www.jgreibus.lt'
def getVersion = '0.1'
def pluginDestination = 'lt.jgreibus.webpackStats2MagicDraw'
def projectID = '1985'
def projectCoreVersion='18.5'
def mainClass = 'lt.jgreibus.Main'
dependencies {
//compile 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile fileTree(dir: MAGIC_DRAW_DIR+'\\lib', include: ['*.jar'])
compile fileTree(dir: MAGIC_DRAW_DIR+'\\lib', include: ['**/*.jar'])
compile fileTree(dir: MAGIC_DRAW_DIR+'\\lib', include: ['**/**/*.jar'])
}
task buildPluginZip(type: Zip, dependsOn: ['jar', 'copyPluginDescriptor', 'copyResourceDescriptor']) {
baseName = projectName
from fileTree('src/main/resources')
from (tasks.jar.archivePath) {
into 'plugins/lt.jgreibus.webpackStats2MagicDraw'
}
}
task copyPluginDescriptor(type: Copy){
from 'src/templates/plugin.xml'
into 'src/main/resources/plugins/lt.jgreibus.webpackStats2MagicDraw'
expand(version: '0.1')
}
task copyResourceDescriptor(type: Copy){
from 'src/templates/MDR_Plugin_WebpackStats2MagicDraw_descriptor.xml'
into 'src/main/resources/data/resourcemanager'
expand(date: new Date(), version: '0.1')
}
bintray {
user = ''
key = ''
publications = ['MyPublication']
publish = true
pkg {
repo = 'webpack2MagicDraw'
name = projectName
licenses = ['GPL-2.0']
vcsUrl = 'https://github.com/jgreibus/webpackStats2MagicDraw.git'
version{
name = getVersion
}
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId 'lt.jgreibus'
artifactId 'lt.jgreibus-webpack2MagicDraw'
version '0.1'
artifact buildPluginZip {
classifier "plugin"
}
}
}
}
artifacts {
archives buildPluginZip
}