import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel import org.gradle.internal.os.OperatingSystem plugins { id 'java' id 'java-library' id 'com.fr.common' version '1.0-SNAPSHOT' } // 模块参数 ext { frVersion = "" cbbVersion = "" outputPath = "build" ignoreTestFailureSetting = true languageLevelSetting = 1.8 jxBrowserVersion = '7.26' } applyGlobalConfigPathIfExist() if (versions.frVersion) { frVersion = versions.frVersion } def frDevVersion = "DEV" + frVersion dependencies { api project(':designer-base') api project(':designer-chart') api project(':designer-form') api project(':designer-realize') } allprojects { apply plugin: 'java' apply plugin: 'java-library' apply plugin: 'idea' group 'com.fr.design' version frDevVersion sourceCompatibility = languageLevelSetting targetCompatibility = languageLevelSetting tasks.withType(JavaCompile) { options.encoding = "UTF-8" } repositories { mavenLocal() maven { url 'https://maven.ej-technologies.com/repository' } } idea { module { inheritOutputDirs = false outputDir = file(outputPath + "/classes") testOutputDir = file(outputPath + "/test-classes") languageLevel = new IdeaLanguageLevel(sourceCompatibility) targetBytecodeVersion = targetCompatibility } } dependencies { implementation 'com.fr.essential:fine-essential:' + cbbVersion implementation 'com.fr.cbb:fine-universal-skeleton:' + cbbVersion implementation 'com.install4j:install4j-runtime:8.0.4' implementation 'com.fr.third:jxbrowser:6.23' implementation "com.fr.third:jxbrowser-v7:${jxBrowserVersion}" implementation "com.fr.third:jxbrowser-swing-v7:${jxBrowserVersion}" implementation 'com.fr.third.server:servlet-api:3.0' implementation 'org.swingexplorer:swexpl:2.0.1' implementation 'org.swingexplorer:swag:1.0' implementation 'net.java.dev.jna:jna:5.4.0' implementation 'org.apache.tomcat:tomcat-catalina:8.5.72' implementation 'org.apache.tomcat:tomcat-websocket:8.5.72' implementation 'io.socket:socket.io-client:0.7.0' implementation 'com.fr.third:fine-third:' + frVersion implementation 'com.fr.core:fine-core:' + frDevVersion implementation 'com.fr.activator:fine-activator:' + frVersion implementation 'com.fr.datasource:fine-datasource:' + frVersion implementation 'com.fr.decision:fine-decision:' + frVersion implementation 'com.fr.schedule:fine-schedule:' + frVersion implementation 'com.fr.report:engine-report:' + frDevVersion implementation 'com.fr.report:engine-x:' + frDevVersion implementation 'com.fr.report:engine-chart:' + frDevVersion implementation 'com.fr.report:engine-i18n:' + frDevVersion implementation 'com.fr.design:design-i18n:' + frDevVersion testImplementation 'org.easymock:easymock:3.5.1' testImplementation 'org.powermock:powermock-module-junit4:1.7.1' testImplementation 'org.powermock:powermock-api-easymock:1.7.1' testImplementation 'org.powermock:powermock-api-mockito2:1.7.4' testImplementation 'junit:junit:4.12' } // 目前开发工程适配 mac_x64, mac_aarch64, windows_x64 if (OperatingSystem.current().isMacOsX() && "aarch64".equals(System.getProperty("os.arch"))) { dependencies { // jxbrowser 6.23不支持M1,因此没有本地库,但是6.23jar还是需要留着,用来兼容 implementation "com.fr.third:jxbrowser-mac-arm-v7:${jxBrowserVersion}" } } else if (OperatingSystem.current().isMacOsX()) { dependencies { implementation 'com.fr.third:jxbrowser-mac:6.23' implementation "com.fr.third:jxbrowser-mac-v7:${jxBrowserVersion}" } } else if (OperatingSystem.current().isWindows()) { dependencies { implementation 'com.fr.third:jxbrowser-win64:6.23' implementation "com.fr.third:jxbrowser-win64-v7:${jxBrowserVersion}" } } }