-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
executable file
·99 lines (83 loc) · 3.48 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
93
94
95
96
97
98
99
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
// Keep Java source compatibility at 1.6 unless you absolutely need 7+ features, as this will
// ensure maximum supportability and compatibility for your plugin.
sourceCompatibility = JavaVersion.VERSION_1_6
version = '1.1'
// External property (deprecated in Gradle 2.x) for Kettle and metastore versions. If you wish to
// put your plugin in the Marketplace against the current revision (say, 5.0.x), use the latest
// release tag
ext.kettle_dependency_revision = 'TRUNK-SNAPSHOT'
ext.tika_dependency_revision = '1.6+'
// This adds the Pentaho repositories and Maven Central. The official list of repos is currently
// kept in GitHub at pentaho/subfloor/master-copies/ivysettings.xml, but if we move to Maven
// you will want to see the common POM.
repositories {
maven {
url 'http://nexus.pentaho.org/content/groups/omni/'
}
maven {
url 'http://repo.pentaho.org/artifactory/repo'
}
ivy {
url "http://repo.pentaho.org/artifactory/repo/"
layout "pattern", {
ivy "[organisation]/[module]/[revision]/[module]-[revision].ivy.xml"
artifact "[organisation]/[module]/[revision]/[module]-[revision].jar"
m2compatible = true
}
}
mavenCentral()
mavenLocal()
}
configurations {
provided
compile {
extendsFrom provided
}
zip
}
dependencies {
// Put compile-time dependencies here. This will include anything that Kettle provides that you
// do not need to override, and usually includes kettle-core, kettle-engine, kettle-ui-swt, and metastore
provided("pentaho-kettle:kettle-core:${project.ext.kettle_dependency_revision}")
provided("pentaho-kettle:kettle-engine:${project.ext.kettle_dependency_revision}")
provided("pentaho-kettle:kettle-ui-swt:${project.ext.kettle_dependency_revision}")
provided("pentaho:metastore:${project.ext.kettle_dependency_revision}")
provided("org.eclipse.swt:swt-linux-x86_64:4.3.2")
compile ("org.apache.tika:tika-app:${project.ext.tika_dependency_revision}")
//compile("org.apache.tika:tika-parsers:${project.ext.tika_dependency_revision}")
//compile('com.google.code.gson:gson:1.7.1')
// Put runtime dependencies here using the runtime() directive. Example:
// Put runtime overrides of compile-time dependencies here. Often this will include the runtime() dependencies plus
// any overrides of JARs in the normal Kettle classloader. Example:
compile fileTree(dir: 'lib-dist', include: '*.jar')
testCompile 'junit:junit:4.10'
}
// This task builds a PDI plugin in the correct format, a ZIP with the plugin JAR at the root and a lib/ folder containing
// all third-party dependencies
task plugin(dependsOn:jar, type: Zip) {
into("${project.name}/") {
from jar.outputs.files
from fileTree(dir: 'package-res')
}
// The list of JARs in the lib/ folder is the complement of the intersection of the compile and runtime dependencies,
// plus the JARs in the runtimeWithoutCompile config
// The list of JARs in the lib/ folder is the complement of the intersection of the compile and runtime dependencies,
// plus the JARs in the runtimeWithoutCompile config
def compileDeps = configurations.compile.resolve()
def providedDeps = configurations.provided.resolve()
def leftovers = compileDeps - providedDeps
into("${project.name}/lib") {
from leftovers
exclude '**/tika-app*.jar'
from fileTree(dir: 'package-res')
}
}
artifacts {
zip plugin
}
task createGradleWrapper(type: Wrapper) {
gradleVersion = '2.1'
}