BankingClient/fints4k/build.gradle

221 lines
5.5 KiB
Groovy
Raw Normal View History

2019-10-02 17:54:11 +00:00
buildscript {
repositories {
jcenter()
}
}
plugins {
id "org.jetbrains.kotlin.multiplatform"
id "com.android.library"
2020-06-14 18:30:34 +00:00
id "maven-publish"
}
kotlin {
jvm("jvm6") {
compilations.main.kotlinOptions {
jvmTarget = "1.6"
}
}
android()
2020-07-02 21:14:14 +00:00
targets {
final def iOSTarget = iOSIsRealDevice ? presets.iosArm64 : presets.iosX64
fromPreset(iOSTarget, 'ios') {
binaries {
framework {
baseName = "fints4k"
embedBitcode(embedBitcodeValue)
export(project(":common"))
2020-07-02 21:14:14 +00:00
}
}
}
}
js() {
nodejs {
testTask {
enabled = false
}
}
browser {
testTask {
enabled = false
}
}
}
sourceSets {
commonMain {
dependencies {
implementation kotlin("stdlib-common")
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$kotlinCoroutinesVersion"
2020-07-11 10:03:28 +00:00
api project(":common")
implementation "io.ktor:ktor-client-core:$ktorVersion"
}
}
commonTest {
dependencies {
implementation kotlin("test-common")
implementation kotlin("test-annotations-common")
implementation "ch.tutteli.atrium:atrium-fluent-en_GB-common:$atriumVersion"
}
}
2019-10-02 17:54:11 +00:00
2020-05-14 20:40:42 +00:00
jvm6Main {
dependencies {
// implementation "io.ktor:ktor-client-cio:$ktorVersion"
implementation "io.ktor:ktor-client-okhttp:$ktorVersion"
2019-10-02 17:54:11 +00:00
implementation "org.slf4j:slf4j-api:$slf4jVersion"
}
}
jvm6Test {
dependencies {
implementation kotlin("test-junit")
2019-10-02 17:54:11 +00:00
implementation "org.junit.jupiter:junit-jupiter:$junit5Version"
runtimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version"
2020-04-23 22:50:14 +00:00
implementation "org.assertj:assertj-core:$assertJVersion"
implementation "org.mockito:mockito-core:$mockitoVersion"
2019-10-02 17:54:11 +00:00
implementation "ch.tutteli.atrium:atrium-fluent-en_GB:$atriumVersion"
implementation project(":BankingUiCommon")
implementation project(":BankFinder")
implementation project(":fints4kBankingClient")
2019-10-02 17:54:11 +00:00
implementation "org.apache.commons:commons-csv:1.8"
2019-10-02 17:54:11 +00:00
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
}
}
androidMain {
dependsOn jvm6Main
dependencies {
implementation "io.ktor:ktor-client-android:$ktorVersion"
}
}
2020-07-02 21:14:14 +00:00
iosMain {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
implementation "io.ktor:ktor-client-ios:$ktorVersion"
implementation "io.ktor:ktor-client-core-native:$ktorVersion"
}
}
jsMain {
dependsOn commonMain
dependencies {
api kotlin("stdlib-js")
implementation "io.ktor:ktor-client-js:$ktorVersion"
implementation "io.ktor:ktor-client-encoding-js:$ktorVersion"
implementation "io.ktor:ktor-client-js-kotlinMultiplatform:$ktorVersion"
}
}
jsTest {
dependencies {
implementation kotlin("test-js")
implementation "ch.tutteli.atrium:atrium-fluent-en_GB-js:$atriumVersion"
}
}
}
}
2020-07-02 21:14:14 +00:00
// Task to generate iOS framework for xcode projects.
task packForXcode(type: Sync) {
2020-07-02 21:14:14 +00:00
final File frameworkDir = new File(buildDir, "xcode-frameworks")
final String mode = project.findProperty("XCODE_CONFIGURATION")?.toUpperCase() ?: 'DEBUG'
final def framework = kotlin.targets.ios.binaries.getFramework("", mode)
inputs.property "mode", mode
dependsOn framework.linkTask
from { framework.outputFile.parentFile }
into frameworkDir
doLast {
new File(frameworkDir, 'gradlew').with {
text = "#!/bin/bash\nexport 'JAVA_HOME=${System.getProperty("java.home")}'\ncd '${rootProject.rootDir}'\n./gradlew \$@\n"
setExecutable(true)
}
}
}
// Run packForXcode when building.
tasks.build.dependsOn packForXcode
2020-07-02 21:14:14 +00:00
android {
compileSdkVersion androidCompileSdkVersion
defaultConfig {
minSdkVersion androidMinSdkVersion
targetSdkVersion androidTargetSdkVersion
versionName version
versionCode appVersionCode
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
pickFirst 'META-INF/ktor-http.kotlin_module'
pickFirst 'META-INF/kotlinx-io.kotlin_module'
pickFirst 'META-INF/atomicfu.kotlin_module'
pickFirst 'META-INF/ktor-utils.kotlin_module'
pickFirst 'META-INF/kotlinx-coroutines-io.kotlin_module'
pickFirst 'META-INF/ktor-client-core.kotlin_module'
pickFirst 'META-INF/DEPENDENCIES'
pickFirst 'META-INF/NOTICE'
pickFirst 'META-INF/LICENSE'
pickFirst 'META-INF/LICENSE.txt'
pickFirst 'META-INF/NOTICE.txt'
}
lintOptions {
abortOnError false
}
2019-10-02 17:54:11 +00:00
}