14
14
15
15
apply plugin : ' groovy'
16
16
17
- sourceCompatibility = ' 1.8'
18
17
def componentNode = parseComponent(project)
19
18
version = componentNode. ' @version'
20
19
def jarBaseName = componentNode. ' @name'
@@ -24,8 +23,11 @@ def frameworkDir = file(moquiDir.absolutePath + '/framework')
24
23
// to run use "gradle dependencyUpdates"
25
24
apply plugin : ' com.github.ben-manes.versions'
26
25
buildscript {
27
- repositories { jcenter() }
28
- dependencies { classpath ' com.github.ben-manes:gradle-versions-plugin:0.15.0' }
26
+ repositories {
27
+ mavenCentral()
28
+ maven { url " https://plugins.gradle.org/m2/" }
29
+ }
30
+ dependencies { classpath ' com.github.ben-manes:gradle-versions-plugin:0.42.0' }
29
31
}
30
32
dependencyUpdates. resolutionStrategy = { componentSelection { rules -> rules. all { ComponentSelection selection ->
31
33
boolean rejected = [' alpha' , ' beta' , ' rc' , ' cr' , ' m' ]. any { qualifier -> selection. candidate. version ==~ / (?i).*[.-]${qualifier}[.\d -]*/ }
@@ -35,43 +37,43 @@ dependencyUpdates.resolutionStrategy = { componentSelection { rules -> rules.all
35
37
repositories {
36
38
flatDir name : ' localLib' , dirs : frameworkDir. absolutePath + ' /lib'
37
39
flatDir name : ' librepo' , dirs : projectDir. absolutePath + ' /librepo'
38
- jcenter ()
40
+ mavenCentral ()
39
41
}
40
42
41
43
// Log4J has annotation processors, disable to avoid warning
42
44
tasks. withType(JavaCompile ) { options. compilerArgs << " -proc:none" }
43
45
tasks. withType(GroovyCompile ) { options. compilerArgs << " -proc:none" }
44
46
45
47
dependencies {
46
- compile project(' :framework' )
48
+ implementation project(' :framework' )
47
49
48
50
// javax.rules, needed for Drools
49
- compile ' jsr94:jsr94:1.1' // ???
51
+ implementation ' jsr94:jsr94:1.1' // ???
50
52
51
53
// KIE Libraries: Drools/jBPM/etc
52
- compile ' org.kie:kie-api:7.3.0.Final' // Apache 2.0
53
- compile ' org.drools:drools-core:7.3.0.Final' // Apache 2.0
54
- compile ' org.drools:drools-jsr94:7.2.0.Final' // Apache 2.0
54
+ implementation ' org.kie:kie-api:7.3.0.Final' // Apache 2.0
55
+ implementation ' org.drools:drools-core:7.3.0.Final' // Apache 2.0
56
+ implementation ' org.drools:drools-jsr94:7.2.0.Final' // Apache 2.0
55
57
// another big mess drools-compiler depends on a bunch of stuff, including xstream which depends on xmlpull which is
56
58
// included in xpp3:xpp3_min, ie redundant classes; so bunch of manual dependencies
57
- compile module(' org.drools:drools-compiler:7.3.0.Final' ) // Apache 2.0
58
- runtime ' org.antlr:antlr-runtime:3.5.2'
59
- runtime ' org.mvel:mvel2:2.3.2.Final'
60
- runtime module(' com.thoughtworks.xstream:xstream:1.4.10' )
61
- runtime ' xpp3:xpp3_min:1.1.4c' // leave out xmlpull here
62
- runtime ' com.google.protobuf:protobuf-java:3.4.0'
59
+ implementation module(' org.drools:drools-compiler:7.3.0.Final' ) // Apache 2.0
60
+ runtimeOnly ' org.antlr:antlr-runtime:3.5.2'
61
+ runtimeOnly ' org.mvel:mvel2:2.3.2.Final'
62
+ runtimeOnly module(' com.thoughtworks.xstream:xstream:1.4.10' )
63
+ runtimeOnly ' xpp3:xpp3_min:1.1.4c' // leave out xmlpull here
64
+ runtimeOnly ' com.google.protobuf:protobuf-java:3.4.0'
63
65
// NOTE: drools java dialect options include ECLIPSE, JANINO, and NATIVE; NATIVE would be good but broken now with Java 8
64
66
// using older version of Janino (2.5.16) as it is the latest version Drools supports
65
- runtime ' org.codehaus.janino:janino:2.5.16' // New BSD
67
+ runtimeOnly ' org.codehaus.janino:janino:2.5.16' // New BSD
66
68
// 'org.codehaus.janino:janino:2.7.8', 'org.codehaus.janino:commons-compiler:2.7.8', 'org.codehaus.janino:commons-compiler-jdk:2.7.8'
67
69
// ECJ latest works fine with Drools but is much bigger/etc and so far we are using mvel and not java dialect anyway
68
- // runtime 'org.eclipse.jdt.core.compiler:ecj:4.5.1'
69
- compile (' org.drools:drools-decisiontables:7.3.0.Final' ) { // Apache 2.0
70
+ // runtimeOnly 'org.eclipse.jdt.core.compiler:ecj:4.5.1'
71
+ implementation (' org.drools:drools-decisiontables:7.3.0.Final' ) { // Apache 2.0
70
72
exclude group : ' org.apache.poi'
71
73
}
72
- compile ' org.apache.poi:poi:3.17'
74
+ implementation ' org.apache.poi:poi:3.17'
73
75
// NOTE: org.apache.poi:poi-ooxml-schemas is a required dependency for drools-decisiontables (through poi-ooxml), but it's a huge file and runs fine without it
74
- compile module(' org.apache.poi:poi-ooxml:3.17' )
76
+ implementation module(' org.apache.poi:poi-ooxml:3.17' )
75
77
}
76
78
77
79
// by default the Java plugin runs test on build, change to not do that (only run test if explicit task)
86
88
baseName = jarBaseName
87
89
}
88
90
task copyDependencies { doLast {
89
- copy { from (configurations. runtime - project(' :framework' ). configurations. runtime - project(' :framework' ). jar. archivePath)
91
+ copy { from (configurations. runtimeClasspath - project(' :framework' ). configurations. runtimeClasspath - project(' :framework' ). jar. archivePath)
90
92
into file(projectDir. absolutePath + ' /lib' ) }
91
93
} }
92
94
copyDependencies. dependsOn cleanLib
0 commit comments