2020-07-12 17:31:18 +00:00
|
|
|
plugins {
|
|
|
|
id "org.jetbrains.kotlin.multiplatform"
|
|
|
|
id "com.android.library"
|
|
|
|
id "maven-publish"
|
|
|
|
}
|
2019-11-03 21:30:52 +00:00
|
|
|
|
|
|
|
|
2020-06-14 19:05:48 +00:00
|
|
|
ext.artifactName = "banking-ui-common"
|
|
|
|
|
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
kotlin {
|
|
|
|
jvm {
|
|
|
|
compilations.main.kotlinOptions {
|
|
|
|
jvmTarget = "1.6"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
targets {
|
|
|
|
// Select iOS target for real device or emulator.
|
|
|
|
final def iOSIsRealDevice = System.getenv('SDK_NAME')?.startsWith("iphoneos")
|
|
|
|
final def iOSTarget = iOSIsRealDevice ? presets.iosArm64 : presets.iosX64
|
|
|
|
|
|
|
|
// iOS target.
|
|
|
|
fromPreset(iOSTarget, 'ios') {
|
|
|
|
binaries {
|
|
|
|
framework {
|
|
|
|
baseName = "BankingUiCommon"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
commonMain {
|
|
|
|
dependencies {
|
|
|
|
api kotlin("stdlib-common")
|
|
|
|
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$kotlinCoroutinesVersion"
|
|
|
|
|
|
|
|
// TODO: try to get rid of this import
|
|
|
|
api project(":fints4k")
|
|
|
|
|
|
|
|
api project(":BankFinder")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
commonTest {
|
|
|
|
dependencies {
|
|
|
|
implementation kotlin("test-common")
|
|
|
|
implementation kotlin("test-annotations-common")
|
|
|
|
|
|
|
|
implementation "ch.tutteli.atrium:atrium-fluent-en_GB:$atriumVersion"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
jvmMain {
|
|
|
|
dependencies {
|
|
|
|
api "net.dankito.utils:java-utils:$javaUtilsVersion"
|
|
|
|
|
|
|
|
api "net.dankito.text.extraction:text-extractor-common:$textExtractorVersion"
|
|
|
|
api "net.dankito.text.extraction:text-info-extractor:$textInfoExtractorVersion"
|
|
|
|
|
|
|
|
implementation "net.dankito.utils:favicon-finder:1.0.0-SNAPSHOT"
|
|
|
|
|
|
|
|
implementation "org.jsoup:jsoup:1.13.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jvmTest {
|
|
|
|
dependencies {
|
|
|
|
implementation kotlin("test-junit")
|
2019-11-03 21:30:52 +00:00
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
implementation "junit:junit:$junitVersion"
|
|
|
|
// implementation "org.junit.jupiter:junit-jupiter:$junit5Version"
|
|
|
|
// runtimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5Version"
|
|
|
|
|
|
|
|
implementation "org.assertj:assertj-core:$assertJVersion"
|
|
|
|
implementation "org.mockito:mockito-core:$mockitoVersion"
|
|
|
|
|
|
|
|
implementation "ch.tutteli.atrium:atrium-api-fluent-en_GB-jdk8:$atriumVersion"
|
|
|
|
|
|
|
|
implementation "org.slf4j:slf4j-simple:$slf4jVersion"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
iosMain {
|
|
|
|
dependencies {
|
|
|
|
api "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
|
|
|
|
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$kotlinCoroutinesVersion"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2019-11-03 21:30:52 +00:00
|
|
|
}
|
2020-07-12 17:31:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Task to generate iOS framework for xcode projects.
|
2020-07-23 14:35:20 +00:00
|
|
|
task packForXcode(type: Sync) {
|
2020-07-12 17:31:18 +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)
|
|
|
|
}
|
|
|
|
}
|
2019-11-03 21:30:52 +00:00
|
|
|
}
|
|
|
|
|
2020-07-23 14:35:20 +00:00
|
|
|
// Run packForXcode when building.
|
|
|
|
tasks.build.dependsOn packForXcode
|
2019-11-03 21:30:52 +00:00
|
|
|
|
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
android {
|
|
|
|
compileSdkVersion androidCompileSdkVersion
|
2020-01-08 17:02:41 +00:00
|
|
|
|
2020-07-09 11:52:59 +00:00
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion androidMinSdkVersion
|
|
|
|
targetSdkVersion androidTargetSdkVersion
|
2020-06-13 14:04:12 +00:00
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
versionName version
|
|
|
|
versionCode appVersionCode
|
2020-04-26 22:22:14 +00:00
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
}
|
2020-04-26 22:22:14 +00:00
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
2020-04-23 01:03:37 +00:00
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
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'
|
|
|
|
}
|
2020-04-23 01:03:37 +00:00
|
|
|
|
2020-07-12 17:31:18 +00:00
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
|
|
|
}
|
2020-04-26 22:22:14 +00:00
|
|
|
|
2019-11-03 21:30:52 +00:00
|
|
|
}
|