Android Studio - Create JAR file with dependencies for standard Java project -
i'm building standard java project, not android project.
it using gson library google. there way create jar file project, while maintaining dependencies gson library? please correct me if i'm framing question wrong.
the build.gradle module looks this:
apply plugin: 'java' dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.google.code.gson:gson:2.3' }
i used instructions here create jar file when run command line using "java -jar myproject.jar" error:
no main manifest attribute, in myproject.jar
i tried looking solution , seems there isn't way create jar file dependencies, although link above pretty new. seems have make aar file in case.
but since mine java project rather android still apply?
thanks.
edit: according video manifest.mf file missing line "main-class:mymainclassname". modifying file jar corrupts it. , can't edit manifest file within android studio. , idea on how can change this?
Comments
Post a Comment