Skip to content

Commit

Permalink
Updates for release series 3.0.0, including build.gradle updates for …
Browse files Browse the repository at this point in the history
…Gradle 7
  • Loading branch information
jonesde committed May 31, 2022
1 parent 03bd43b commit ad43cd0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion MoquiConf.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- No copyright or license for configuration file, details here are not considered a creative work. -->
<moqui-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-2.1.xsd">
<moqui-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd">

<tools>
<tool-factory class="org.moqui.kie.KieToolFactory" init-priority="25" disabled="false"/>
Expand Down
44 changes: 23 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

apply plugin: 'groovy'

sourceCompatibility = '1.8'
def componentNode = parseComponent(project)
version = componentNode.'@version'
def jarBaseName = componentNode.'@name'
Expand All @@ -24,8 +23,11 @@ def frameworkDir = file(moquiDir.absolutePath + '/framework')
// to run use "gradle dependencyUpdates"
apply plugin: 'com.github.ben-manes.versions'
buildscript {
repositories { jcenter() }
dependencies { classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0' }
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies { classpath 'com.github.ben-manes:gradle-versions-plugin:0.42.0' }
}
dependencyUpdates.resolutionStrategy = { componentSelection { rules -> rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier -> selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/ }
Expand All @@ -35,43 +37,43 @@ dependencyUpdates.resolutionStrategy = { componentSelection { rules -> rules.all
repositories {
flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib'
flatDir name: 'librepo', dirs: projectDir.absolutePath + '/librepo'
jcenter()
mavenCentral()
}

// Log4J has annotation processors, disable to avoid warning
tasks.withType(JavaCompile) { options.compilerArgs << "-proc:none" }
tasks.withType(GroovyCompile) { options.compilerArgs << "-proc:none" }

dependencies {
compile project(':framework')
implementation project(':framework')

// javax.rules, needed for Drools
compile 'jsr94:jsr94:1.1' // ???
implementation 'jsr94:jsr94:1.1' // ???

// KIE Libraries: Drools/jBPM/etc
compile 'org.kie:kie-api:7.3.0.Final' // Apache 2.0
compile 'org.drools:drools-core:7.3.0.Final' // Apache 2.0
compile 'org.drools:drools-jsr94:7.2.0.Final' // Apache 2.0
implementation 'org.kie:kie-api:7.3.0.Final' // Apache 2.0
implementation 'org.drools:drools-core:7.3.0.Final' // Apache 2.0
implementation 'org.drools:drools-jsr94:7.2.0.Final' // Apache 2.0
// another big mess drools-compiler depends on a bunch of stuff, including xstream which depends on xmlpull which is
// included in xpp3:xpp3_min, ie redundant classes; so bunch of manual dependencies
compile module('org.drools:drools-compiler:7.3.0.Final') // Apache 2.0
runtime 'org.antlr:antlr-runtime:3.5.2'
runtime 'org.mvel:mvel2:2.3.2.Final'
runtime module('com.thoughtworks.xstream:xstream:1.4.10')
runtime 'xpp3:xpp3_min:1.1.4c' // leave out xmlpull here
runtime 'com.google.protobuf:protobuf-java:3.4.0'
implementation module('org.drools:drools-compiler:7.3.0.Final') // Apache 2.0
runtimeOnly 'org.antlr:antlr-runtime:3.5.2'
runtimeOnly 'org.mvel:mvel2:2.3.2.Final'
runtimeOnly module('com.thoughtworks.xstream:xstream:1.4.10')
runtimeOnly 'xpp3:xpp3_min:1.1.4c' // leave out xmlpull here
runtimeOnly 'com.google.protobuf:protobuf-java:3.4.0'
// NOTE: drools java dialect options include ECLIPSE, JANINO, and NATIVE; NATIVE would be good but broken now with Java 8
// using older version of Janino (2.5.16) as it is the latest version Drools supports
runtime 'org.codehaus.janino:janino:2.5.16' // New BSD
runtimeOnly 'org.codehaus.janino:janino:2.5.16' // New BSD
// 'org.codehaus.janino:janino:2.7.8', 'org.codehaus.janino:commons-compiler:2.7.8', 'org.codehaus.janino:commons-compiler-jdk:2.7.8'
// ECJ latest works fine with Drools but is much bigger/etc and so far we are using mvel and not java dialect anyway
// runtime 'org.eclipse.jdt.core.compiler:ecj:4.5.1'
compile ('org.drools:drools-decisiontables:7.3.0.Final') { // Apache 2.0
// runtimeOnly 'org.eclipse.jdt.core.compiler:ecj:4.5.1'
implementation ('org.drools:drools-decisiontables:7.3.0.Final') { // Apache 2.0
exclude group: 'org.apache.poi'
}
compile 'org.apache.poi:poi:3.17'
implementation 'org.apache.poi:poi:3.17'
// 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
compile module('org.apache.poi:poi-ooxml:3.17')
implementation module('org.apache.poi:poi-ooxml:3.17')
}

// by default the Java plugin runs test on build, change to not do that (only run test if explicit task)
Expand All @@ -86,7 +88,7 @@ jar {
baseName = jarBaseName
}
task copyDependencies { doLast {
copy { from (configurations.runtime - project(':framework').configurations.runtime - project(':framework').jar.archivePath)
copy { from (configurations.runtimeClasspath - project(':framework').configurations.runtimeClasspath - project(':framework').jar.archivePath)
into file(projectDir.absolutePath + '/lib') }
} }
copyDependencies.dependsOn cleanLib
Expand Down
2 changes: 1 addition & 1 deletion component.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-2.1.xsd"
<component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd"
name="moqui-kie" version="1.0.4"/>

0 comments on commit ad43cd0

Please sign in to comment.