https://kotlinlang.org logo
#getting-started
Title
# getting-started
s

Sam Smallman

04/27/2022, 9:47 AM
Currently building a Kotlin library for some NFC logic. How do I import the android.nfc.tech package so that I can use NfcV within the kotlin lib?
t

tseisel

04/27/2022, 11:29 AM
You need a specific setup to write a Kotlin library tha depends on the Android framework. Basically, you should apply the
com.android.library
Gradle plugin instead of
kotlin-jvm
.
s

Sam Smallman

04/28/2022, 7:46 AM
Thanks @tseisel for the pointer. I’ll look into that!
Hey @tseisel I don’t suppose you could point me to a repo that has done this. I’m still pretty new to all things gradle so not quite sure of the required settings.
20 Views