dave08
11/15/2020, 3:36 PMVampire
11/16/2020, 1:22 AMdave08
11/16/2020, 10:25 AMcomponents.release
mentioned... another one of Groovy's magic tricks...Vampire
11/16/2020, 10:30 AMcomponents.named("release")
dave08
11/16/2020, 10:33 AMrelease(MavenPublication) { .. }
?dave08
11/16/2020, 10:34 AMdave08
11/16/2020, 10:35 AMcreate("release", MavenPublication::class.java) {
...
}
? It's hard to know what the Android plugin does for you, and what still needs to be done...Vampire
11/16/2020, 10:36 AMVampire
11/16/2020, 10:36 AMcreate<MavenPublication>("release") {
Vampire
11/16/2020, 10:36 AMVampire
11/16/2020, 10:36 AMdave08
11/16/2020, 10:41 AMcomponents["java"]
needs to be
components["release"]
? the thing is I tried the instructions there, but they didn't seem to work on Android... and the Android ones don't show kts... googling gave me articles and examples from 2019... or 2017..
What does that key used in components represent here? The created publication, or something Android provides?
The gradle docs say:
Currently 3 types of component are supported: 'components.java' (added by the JavaPlugin), 'components.web' (added by the WarPlugin) and(added by the JavaPlatformPlugin).components.javaPlatform
Vampire
11/16/2020, 10:47 AMOh.. so `
components["java"]
needs to be
components["release"]
?Why? The gradle docs say:
Currently 3 types of component are supported: 'components.java' (added by the JavaPlugin), 'components.web' (added by the WarPlugin) andI guess the Android plugin adds that component but due to that there is not static accessor and you have to use the(added by the JavaPlatformPlugin).components.javaPlatform
named
methoddave08
11/16/2020, 10:48 AMSoftwareComponent
expected by from()
...dave08
11/16/2020, 10:50 AMVampire
11/16/2020, 12:10 PMcomponents.named("release")
is from the lazy api, it gives you a Provider<SoftwareComponent>
if you need the SoftwareComponent
, either get it from the provider or right away use components.getByName("release")
or as you said components["release"]
should also workdave08
11/16/2020, 1:08 PM