light
light

Reputation: 111

How to create .jar with Gradle (Android Studio) with dependencies

I'd like to make a .jar file from my Android library project. I know Gradle itself creates in build/intermediates/bundles/release/ classes.jar file which contains all my project classes. However I'd like to obtain a .jar which includes all third party libraries I use in project.

How to do it ? How to write such gradle task ?

I'd really like to ommit creating .aar file due to I don't use any res in the project which normally makes creating .jar impossible. I want it .jar.

Upvotes: 1

Views: 437

Answers (1)

faizanjehangir
faizanjehangir

Reputation: 2851

android does not have only java files, it contains assets, resources, third party projects, So there is no need to create jar for android projects. However Recently, Google introduced the aar that can be used in android projects. read more here

Upvotes: 1

Related Questions