I need to build a jar with assets in gradle in android studio,how to do it?
I’m developing a project that making a jar to provide others,and my jar must have assets file. the normal jar only have .class and aar is not run in some other ones project.
thanks all
you can create a custom jar task
task assetsJar(type:Jar) { classifier = "assets" android.sourceSets.all { sourceSet -> from sourceSet.assets.srcDirs } }
This creates a jar with the assets of all sourceSets
cheers, René