group 'com.ggx.editor'
version '1.0-SNAPSHOT'
tasks.withType(JavaCompile.class) {
    options.encoding = "UTF-8"
}
buildscript {
    dependencies {
        classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'
    }

    repositories {
        mavenLocal()
        mavenCentral()
    }
}
apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}
//packagingOptions {
//    exclude 'META-INF/LICENSE-LGPL-2.1.txt'
//    exclude 'META-INF/LICENSE-LGPL-3.txt'
//    exclude 'META-INF/LICENSE-W3C-TEST'
//}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
//    compile project(':richtextfx')
    compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.9.2'
    compile 'com.jfoenix:jfoenix:8.0.4'
    def flexmarkVersion = '0.35.0'
    compile 'com.vladsch.flexmark:flexmark-all:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-util:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-tables:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-abbreviation:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-anchorlink:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-aside:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-autolink:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-definition:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-footnotes:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-gfm-tables:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-toc:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-wikilink:' + flexmarkVersion
//    compile 'com.vladsch.flexmark:flexmark-ext-yaml-front-matter:' + flexmarkVersion
}
apply plugin: 'javafx-gradle-plugin'
// Configures plugin
jfx {
    verbose = true
    mainClass = "com.ggx.editor.Main"
    jfxAppOutputDir = "build/jfx/app"
    jfxMainAppJarName = "mark-book.jar"
    deployDir = "src/main/deploy"
    useEnvironmentRelativeExecutables = true
    libFolderName = "lib"

    // gradle jfxJar
    css2bin = false
    preLoader = null // String
    updateExistingJar = false
    allPermissions = false
    manifestAttributes = null // Map<String, String>
    addPackagerJar = true
    copyAdditionalAppResourcesToJar = false
    skipCopyingDependencies = false
    useLibFolderContentForManifestClasspath = false
    fixedManifestClasspath = null

    // gradle jfxNative
    identifier = null  // String - setting this for windows-bundlers makes it possible to generate upgradeable installers (using same GUID)
    vendor = "ggx.org"
    nativeOutputDir = "build/jfx/native"
    bundler = "all" // set this to some specific, if your don't want all bundlers running, examples "windows.app", "jnlp", ...
    jvmProperties = null // Map<String, String>
    jvmArgs = null // List<String>
    userJvmArgs = null // Map<String, String>
    launcherArguments = null // List<String>
    nativeReleaseVersion = "1.0"
    needShortcut = false
    needMenu = false
    bundleArguments = [
            // dont bundle JRE (not recommended, but increases build-size/-speed)
//            runtime: "D:\\Program Files\\Java\\jre1.8.0_131"
            runtime: "/usr/lib/jvm/java-8-oracle/jre"
    ]
    appName = "MarkBook" // this is used for files below "src/main/deploy", e.g. "src/main/deploy/package/windows/project.ico"
    additionalBundlerResources = null // path to some additional resources for the bundlers when creating application-bundle
    additionalAppResources = null // path to some additional resources when creating application-bundle
    //secondaryLaunchers = [[appName:"somethingDifferent"], [appName:"somethingDifferent2"]]
    fileAssociations = null // List<Map<String, Object>>
    noBlobSigning = false // when using bundler "jnlp", you can choose to NOT use blob signing
    customBundlers = null // List<String>
    failOnError = false
    onlyCustomBundlers = false
    skipJNLP = false
    skipNativeVersionNumberSanitizing = false // anything than numbers or dots are removed
    additionalJarsignerParameters = null // List<String>
    skipMainClassScanning = false // set to true might increase build-speed

    skipNativeLauncherWorkaround124 = false
    skipNativeLauncherWorkaround167 = false
    skipNativeLauncherWorkaround205 = false
    skipJNLPRessourcePathWorkaround182 = false
    skipSigningJarFilesJNLP185 = false
    skipSizeRecalculationForJNLP185 = false
    skipMacBundlerWorkaround = false

    // gradle jfxRun
    runJavaParameter = null // String
    runAppParameter = null // String

    // per default the outcome of the gradle "jarTask" will be used, set this to specify otherwise (like proguard-output)
    alternativePathToJarFile = null // String

    // to disable patching of ant-javafx.jar, set this to false
    usePatchedJFXAntLib = true

    // making it able to support absolute paths, defaults to "false" for maintaining old behaviour
    checkForAbsolutePaths = false

    // gradle jfxGenerateKeyStore
    keyStore = "src/main/deploy/ggx.keystore"
    keyStoreAlias = "editor"
    keyStorePassword = "guanguoxiang"
    keyPassword = null // will default to keyStorePassword
    keyStoreType = "keystore"
    overwriteKeyStore = false

    certDomain = null // required
    certOrgUnit = null // defaults to "none"
    certOrg = null // required
    certState = null // required
    certCountry = null // required
}