A Gradle plugin to allow consuming Android's AAR dependencies as JAR dependencies for JVM projects.
Apply the plugin at the root project (preferable):
plugins {
java
id("io.github.gmazzo.aar2jar") version "<latest>"
}
dependencies {
implementation("androidx.fragment:fragment:1.8.5")
}
repositories {
mavenCentral()
google()
}
Then, whenever you consume classes from the AAR as it if it was a JAR.