{"action":"created","issue":{"url":"https://api.github.com/repos/MobiVM/robovm/issues/314","repository_url":"https://api.github.com/repos/MobiVM/robovm","labels_url":"https://api.github.com/repos/MobiVM/robovm/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/MobiVM/robovm/issues/314/comments","events_url":"https://api.github.com/repos/MobiVM/robovm/issues/314/events","html_url":"https://github.com/MobiVM/robovm/issues/314","id":337551216,"node_id":"MDU6SXNzdWUzMzc1NTEyMTY=","number":314,"title":"Unable to include external jar library","user":{"login":"Hotshot5000","id":7155964,"node_id":"MDQ6VXNlcjcxNTU5NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7155964?v=4","gravatar_id":"","url":"https://api.github.com/users/Hotshot5000","html_url":"https://github.com/Hotshot5000","followers_url":"https://api.github.com/users/Hotshot5000/followers","following_url":"https://api.github.com/users/Hotshot5000/following{/other_user}","gists_url":"https://api.github.com/users/Hotshot5000/gists{/gist_id}","starred_url":"https://api.github.com/users/Hotshot5000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hotshot5000/subscriptions","organizations_url":"https://api.github.com/users/Hotshot5000/orgs","repos_url":"https://api.github.com/users/Hotshot5000/repos","events_url":"https://api.github.com/users/Hotshot5000/events{/privacy}","received_events_url":"https://api.github.com/users/Hotshot5000/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-07-02T14:51:07Z","updated_at":"2018-10-30T07:49:01Z","closed_at":"2018-07-04T18:15:55Z","author_association":"NONE","body":"I have been trying to get my libgdx project working with robovm on iOS. I have a few dependencies that are include in the core build.gradle such as:\r\nimplementation 'com.google.code.gson:gson:2.4'\r\nimplementation 'org.apache.httpcomponents:httpmime:4.5.1'\r\n    implementation 'com.h2database:h2:1.4.190'\r\n    implementation 'net.sf.trove4j:trove4j:3.0.3'\r\netc...\r\n\r\nI have expected that these libraries will have been automatically linked to the rest of the project. But it turns out that is not the case. I managed to make the apache commons-io 2.4 library to work by downloading it manually and adding:\r\nimplementation files('libs/commons-io-2.4.jar')\r\nto the core build.gradle and also adding it to robovm.xml in forceLinkClases with <pattern>org.apache.commons.io.Charsets</pattern>\r\nInitially it didn't work but after a few .robovm cleanups and some Android Studio restarts and other random operations I finally got it working. As it happened I also had quite a few other libraries that I needed to get working in order to debug my project. Right now I am stuck with implementation files('libs/gson-2.4.jar') that I manually downloaded. I also tried to add this project to a lib folder in ios build and link it from there using \r\n\r\nproject(\":ios\") {\r\n    apply plugin: \"java\"\r\n    apply plugin: \"robovm\"\r\n\r\n\r\n    dependencies {\r\n        compile project(\":core\")\r\n        compile \"com.mobidevelop.robovm:robovm-rt:$roboVMVersion\"\r\n        compile \"com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion\"\r\n        compile \"com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion\"\r\n        compile \"com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios\"\r\n//        compile \"com.badlogicgames.gdx:gdx-bullet:$gdxVersion\"\r\n//        compile \"com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-ios\"\r\n//        compile files(\"/Users/sebi/libgdx/extensions/gdx-bullet/libs/gdx-bullet-natives.jar\")\r\n\r\n        // Here we find the commons-io-2.4.jar\r\n        compile fileTree(dir: 'lib', include: '*.jar')\r\n//        compile \"com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-ios\"\r\n    }\r\n}\r\n\r\nbut this also seemed to fail. No matter what I do I either get a \r\n\r\n[ERROR] Couldn't compile app\r\norg.robovm.compiler.CompilerException: Root class com.google.gson.GsonBuilder not found\r\n\tat org.robovm.compiler.AppCompiler.getRootClasses(AppCompiler.java:288)\r\n\tat org.robovm.compiler.AppCompiler.compile(AppCompiler.java:452)\r\n\tat org.robovm.compiler.AppCompiler.build(AppCompiler.java:775)\r\n\tat org.robovm.idea.compilation.RoboVmCompileTask$4.doCompile(RoboVmCompileTask.java:291)\r\n\tat org.robovm.idea.compilation.RoboVmCompilerThread.run(RoboVmCompilerThread.java:66)\r\n\r\nor if I remove the <pattern>com.google.gson.GsonBuilder</pattern> from robovm.xml I get:\r\n\r\njava.lang.NoClassDefFoundError: com/google/gson/GsonBuilder\r\n\tat headwayent.blackholedarksun.APP_Game.initializeGson(APP_Game.java:859)\r\n\tat headwayent.blackholedarksun.APP_SinglePlayerGame$LoadRawData.run(APP_SinglePlayerGame.java:602)\r\n\tat headwayent.hotshotengine.ENG_MainThread.run(ENG_MainThread.java:398)\r\n\r\nat runtime.\r\n\r\n#### Configuration\r\n_Please provide the build system, version(s), and targets affected._\r\n\r\nBuild Tools:\r\n\r\n[X]  IDEA plugin\r\n  Eclipse plugin\r\n Gradle plugin\r\nVersions:\r\ngdxVersion = '1.9.8'\r\nroboVMVersion = '2.3.4'\r\nbox2DLightsVersion = '1.4'\r\nashleyVersion = '1.7.0'\r\naiVersion = '1.8.0'\r\nPlease provide the version of RoboVM, XCode and JDK used\r\n\r\nRobovm: 2.3.4\r\nXCode: 9.4.1\r\nJDK: openjdk version \"1.8.0_152-release\" - internal Android Studio jdk\r\nAndroid Studio version: 3.1.1\r\nBuild Targets:\r\narm64 for iPhone SE (real device)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/MobiVM/robovm/issues/comments/434202837","html_url":"https://github.com/MobiVM/robovm/issues/314#issuecomment-434202837","issue_url":"https://api.github.com/repos/MobiVM/robovm/issues/314","id":434202837,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDIwMjgzNw==","user":{"login":"dkimitsa","id":24827357,"node_id":"MDQ6VXNlcjI0ODI3MzU3","avatar_url":"https://avatars0.githubusercontent.com/u/24827357?v=4","gravatar_id":"","url":"https://api.github.com/users/dkimitsa","html_url":"https://github.com/dkimitsa","followers_url":"https://api.github.com/users/dkimitsa/followers","following_url":"https://api.github.com/users/dkimitsa/following{/other_user}","gists_url":"https://api.github.com/users/dkimitsa/gists{/gist_id}","starred_url":"https://api.github.com/users/dkimitsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkimitsa/subscriptions","organizations_url":"https://api.github.com/users/dkimitsa/orgs","repos_url":"https://api.github.com/users/dkimitsa/repos","events_url":"https://api.github.com/users/dkimitsa/events{/privacy}","received_events_url":"https://api.github.com/users/dkimitsa/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T07:49:01Z","updated_at":"2018-10-30T07:49:01Z","author_association":"CONTRIBUTOR","body":"hi, can you share minimal project to reproduce the issue ? "}}
{"actor":{"display_login":"dkimitsa"}}