Christian Sousa
03/31/2020, 11:34 AMMyLib-release.kotlin_module
and not any of the classes.
Sorry if it’s not the right place to ask this but since I can only see the *.kotlin_module
on my External Libraries I thought this would be the best place to ask.Kris Wong
03/31/2020, 1:06 PMChristian Sousa
03/31/2020, 1:42 PMimplementation "com.christiansousa.lib:MyLib:1.0.0"
and then try to import something from the lib I simply can’t.
Then I went ahead and looked into the External Libraries Tree that I have in my blank project but there’s not a single class to be seen, just the kotlin_module
file.
I don’t know if I’m explaining correctly what the issue is, but anyways thank you for your time @Kris WongKris Wong
03/31/2020, 1:47 PMChristian Sousa
03/31/2020, 1:52 PMKris Wong
03/31/2020, 1:55 PMChristian Sousa
03/31/2020, 1:56 PMproject('MyLib') {
artifactoryPublish.dependsOn('build')
publishing {
publications {
aar(MavenPublication) {
groupId = "com.christiansousa.lib"
artifactId = project.getName()
version = "1.0.0"
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
}
}
}
artifactoryPublish {
publications(publishing.publications.aar)
}
}
and
artifactory {
clientConfig.setIncludeEnvVars(true)
<http://clientConfig.info|clientConfig.info>.addEnvironmentProperty('test.adding.dynVar',new Date().toString())
contextUrl = '<http://127.0.0.1:8082/artifactory>'
publish {
repository {
repoKey = 'libs-release-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
ivy {
ivyLayout = '[organization]/[module]/ivy-[revision].xml'
artifactLayout = '[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]'
mavenCompatible = true
}
}
defaults {
publishArtifacts = true
properties = ['qa.level': 'basic', 'dev.team' : 'core']
publishPom = true
}
}
}
allprojects {
repositories {
google()
jcenter()
repositories {
maven {
url "<http://localhost:8082/artifactory/libs-release-local>"
credentials {
username "admin"
password "password"
}
}
}
}
}
In the app I have:
dependencies {
...
implementation "com.christiansousa.lib:MyLib:1.0.0"
}
Kris Wong
03/31/2020, 2:10 PMChristian Sousa
03/31/2020, 2:12 PMKris Wong
03/31/2020, 2:13 PMChristian Sousa
03/31/2020, 2:15 PMKris Wong
03/31/2020, 2:38 PMChristian Sousa
03/31/2020, 2:43 PMkotlin {
val kotlin_version = "1.3.70"
val coroutines_version = "1.3.4"
val serialization_version = "0.20.0"
val ktor_version = "1.3.2"
//select iOS target platform depending on the Xcode environment variables
val iOSTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
::iosArm64
else
::iosX64
iOSTarget("ios") {
binaries {
framework {
baseName = "MyLib"
}
}
}
android("android")
sourceSets["commonMain"].dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutines_version")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serialization_version")
implementation("io.ktor:ktor-client:$ktor_version")
implementation("io.ktor:ktor-client-core:$ktor_version")
implementation("io.ktor:ktor-client-json:$ktor_version")
implementation("io.ktor:ktor-client-serialization:$ktor_version")
implementation("com.benasher44:uuid:0.1.0")
implementation("com.soywiz.korlibs.krypto:krypto:1.11.0")
implementation("dev.icerock.moko:resources:0.9.0")
implementation("com.google.android:flexbox:2.0.1")
}
sourceSets["androidMain"].dependencies {
implementation("androidx.preference:preference-ktx:1.1.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version")
implementation("io.ktor:ktor-client-android:$ktor_version")
implementation("io.ktor:ktor-client-core-jvm:$ktor_version")
implementation("io.ktor:ktor-client-json-jvm:$ktor_version")
implementation("io.ktor:ktor-client-serialization-jvm:$ktor_version")
}
sourceSets["iosMain"].dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serialization_version")
implementation("io.ktor:ktor-client-ios:$ktor_version")
implementation("io.ktor:ktor-client-core-native:$ktor_version")
implementation("io.ktor:ktor-client-serialization-native:$ktor_version")
}
}
android {
compileSdkVersion(29)
buildToolsVersion("29.0.3")
defaultConfig {
minSdkVersion(16)
targetSdkVersion(29)
}
buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "<http://proguard-rules.pro|proguard-rules.pro>")
}
}
}
Kris Wong
03/31/2020, 2:48 PMisMinifyEnabled
set to trueChristian Sousa
03/31/2020, 3:03 PMKris Wong
03/31/2020, 3:08 PMChristian Sousa
03/31/2020, 3:14 PMKris Wong
03/31/2020, 3:41 PMChristian Sousa
03/31/2020, 3:42 PM