Skip to content

Instantly share code, notes, and snippets.

Thomas Wirth G00fY2

Block or report user

Report or block G00fY2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kellyfj / Gradle Android Jar Library
Last active Nov 8, 2019
Using the Android Library plugin for Gradle - create a .jar file (in addition to a .aar library file) that contains all the classes (and dependent jar files). Solution is based off a combination of solutions from and the Winning answer to this Stackoverflow Question…
View Gradle Android Jar Library
android.libraryVariants.all { variant ->
def name =
if (name.equals( {
return; // Skip debug builds.
def task = project.tasks.create "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompile
//Include Java classes
task.from variant.javaCompile.destinationDir
//Include dependent jars with some exceptions
You can’t perform that action at this time.