Chris Zhang
02/14/2019, 8:49 PMbuildscript {
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()
maven { url '<https://dl.bintray.com/kotlin/kotlin-eap>' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
maven { url '<https://dl.bintray.com/kotlin/kotlin-eap>' }
maven { url "<https://artifactory.global.square/artifactory/releases>" }
maven { url "<https://artifactory.global.square/artifactory/square-public>" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'kotlin-multiplatform'
apply plugin: 'maven-publish'
kotlin {
targets {
final def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
? presets.iosArm64 : presets.iosX64
fromPreset(iOSTarget, 'ios') {
compilations.main {
outputKinds 'FRAMEWORK'
extraOpts '-module-name', 'SQPEKT', '-output', "./tmp/KTPricingEngine.framework" // This should use a "real"/output path
}
}
fromPreset(presets.jvm, 'android')
}
sourceSets {
commonMain.dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
androidMain.dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
implementation "com.squareup.client.protos:bills-proto:ee6541f9-7d56ab47"
}
}
}
// workaround for <https://youtrack.jetbrains.com/issue/KT-27170>
configurations {
compileClasspath
}
./gradlew publishToMavenLocal
"kotlin-multiplatform-hackweek:pricingEngine-android:unspecified"