apply plugin: 'kotlin'
apply plugin: 'application'


sourceCompatibility = "1.8"
targetCompatibility = "1.8"

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}


repositories {
    // for security issues fixed version of iText 2 from JasperReports
    maven {
        url "http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts"
    }
}


archivesBaseName = "Bankmeister"

mainClassName = "net.dankito.banking.ui.javafx.BankingJavaFXApplication"

def title = 'Bankmeister'


dependencies {
    implementation project(':BankingJavaFxControls')

    implementation project(':fints4kBankingClient')
    //implementation project(':hbci4jBankingClient')

    implementation project(':fints4k')
    implementation project(':fints4k-jvm')

    implementation project(':LuceneBankingPersistence')

    implementation project(':CsvAccountTransactionsImporterAndExporter')


    implementation "net.dankito.text.extraction:poppler-text-extractor:$textExtractorVersion"
    implementation "net.dankito.text.extraction:pdfbox-text-extractor:$textExtractorVersion"
    implementation "net.dankito.text.extraction:itext2-text-extractor:$textExtractorVersion"
    implementation "net.dankito.text.extraction:tesseract4-commandline-text-extractor:$textExtractorVersion"
    implementation "net.dankito.text.extraction:tika-text-extractor:$textExtractorVersion"

    implementation "ch.qos.logback:logback-classic:$logbackVersion"
}


jar {
    zip64 = true

    // If one of the source JARs is signed, merging it into one fat jar destroys the signature -> remove signatures
    // (but may runs into problems with jars that require a valid signature like BouncyCastle, see
    // https://stackoverflow.com/questions/51455197/gradle-fatjar-could-not-find-or-load-main-class)
    exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")

    manifest {
        attributes  'Main-Class': mainClassName,
                'Implementation-Title': title,
                'Implementation-Version': appVersionName
    }

    duplicatesStrategy = DuplicatesStrategy.EXCLUDE

    from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }

}