jean
07/16/2020, 7:47 AMjvm("android")
for targeting android but I’m reading in the doc that one could also use android { ... }
.
Is the android
shortcut useful only to be able to configure build variants, dependencies, etc… ? The doc says also id("com.android.library")
is necessary but gradle can’t resolve it
Plugin [id: 'com.android.library'] was not found in any of the following sources:
(and then nothing, it does not say any sources).
What if I want to target android and desktop through the jvm? should I just use jvm()
?gildor
07/16/2020, 8:11 AMjean
07/16/2020, 8:13 AMbuildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0-beta03")
}
}
which makes apply(plugin = "com.android.library")
works but still not for id("com.android.library")
in the plugins
bracketlouiscad
07/16/2020, 8:14 AMbuild.gradle[.kts]
file?jean
07/16/2020, 8:14 AMandroid()
targetlouiscad
07/16/2020, 8:16 AMjean
07/16/2020, 8:18 AMjvm()
target and my android project using the shared code should declare a
kotlin {
android { ... }
}
?louiscad
07/16/2020, 8:24 AMjean
07/16/2020, 8:26 AMlouiscad
07/16/2020, 8:28 AMjvm("android")
thing 😄jean
07/16/2020, 8:34 AMlouiscad
07/16/2020, 8:38 AMKris Wong
07/16/2020, 1:19 PM