{"action":"closed","issue":{"url":"https://api.github.com/repos/yahoo/squidb/issues/212","repository_url":"https://api.github.com/repos/yahoo/squidb","labels_url":"https://api.github.com/repos/yahoo/squidb/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/yahoo/squidb/issues/212/comments","events_url":"https://api.github.com/repos/yahoo/squidb/issues/212/events","html_url":"https://github.com/yahoo/squidb/issues/212","id":173090508,"number":212,"title":"Build failures with Jack compiler","user":{"login":"Aranda","id":1129912,"avatar_url":"https://avatars.githubusercontent.com/u/1129912?v=3","gravatar_id":"","url":"https://api.github.com/users/Aranda","html_url":"https://github.com/Aranda","followers_url":"https://api.github.com/users/Aranda/followers","following_url":"https://api.github.com/users/Aranda/following{/other_user}","gists_url":"https://api.github.com/users/Aranda/gists{/gist_id}","starred_url":"https://api.github.com/users/Aranda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aranda/subscriptions","organizations_url":"https://api.github.com/users/Aranda/orgs","repos_url":"https://api.github.com/users/Aranda/repos","events_url":"https://api.github.com/users/Aranda/events{/privacy}","received_events_url":"https://api.github.com/users/Aranda/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-25T00:44:29Z","updated_at":"2016-11-03T03:04:32Z","closed_at":"2016-11-03T03:04:32Z","body":"Has anybody got this working yet? It seems to build until I start to use a generated Model class in my code.\n\nDeliverySpec.java\n\n```\npackage com.me.testapp.squidb;\n\nimport com.yahoo.squidb.annotations.PrimaryKey;\nimport com.yahoo.squidb.annotations.TableModelSpec;\n\n@TableModelSpec(className=\"Delivery\", tableName=\"delivery\")\npublic class DeliverySpec {\n    @PrimaryKey\n    public long delivery_id;\n}\n```\n\nUsage of the generated model:\n\n```\npackage com.me.testapp.wire;\n\nimport com.me.testapp.squidb.Delivery;\n\npublic class DeliveryWire {\n    public long delivery_id;\n\n    public static Delivery toModel(DeliveryWire dw)  {\n        Delivery d = new Delivery();\n        d.setDeliveryId(dw.delivery_id);\n        return d;\n    }\n\n    public static DeliveryWire fromModel(Delivery d) {\n        DeliveryWire dw = new DeliveryWire();\n        dw.delivery_id = d.getDeliveryId();\n        return dw;\n    }\n}\n```\n\nProject level build.gradle\n\n```\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:2.2.0-beta1'\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n```\n\nModule level build.gradle\n\n```\napply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 24\n    buildToolsVersion \"24.0.1\"\n\n    defaultConfig {\n        applicationId \"com.me.testapp\"\n        minSdkVersion 21\n        targetSdkVersion 24\n        versionCode 1\n        versionName \"1.0\"\n        jackOptions {\n            enabled true\n        }\n    }\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    testCompile 'junit:junit:4.12'\n    compile 'com.android.support:appcompat-v7:24.2.0'\n    compile 'com.android.support:support-v4:24.2.0'\n    compile 'com.google.android.gms:play-services-appindexing:9.4.0'\n\n    compile 'com.yahoo.squidb:squidb:3.1.2'\n    compile 'com.yahoo.squidb:squidb-annotations:3.1.2'\n    compile 'com.yahoo.squidb:squidb-android:3.1.2'\n    annotationProcessor 'com.yahoo.squidb:squidb-processor:3.1.2'\n}\n```\n\nInitial build error:\n\n```\n* What went wrong:\nExecution failed for task ':app:transformJackWithJackForDebug'.\n> com.android.jack.ir.JNodeInternalError: Error building Jack IR: com.android.jack.eclipse.jdt.internal.compiler.ast.TypeDeclaration at \"/Users/aranda/code/SignatureCapture/app/src/main/java/com/adapptor/signaturecapture/wire/DeliveryWire.java:9.14-9.25\"\n```\n\nStack trace that appears if you try to build again:\n\n```\n:app:transformJackWithJackForDebug\nSwitch enum optimization is disabled due to incremental compilation\n\nERROR: Library reading phase: file '/Users/aranda/code/SignatureCapture/app/build/intermediates/packaged/debug/classes.zip' is an invalid library\n\ncom.android.jack.api.v01.CompilationException: Library reading phase: file '/Users/aranda/code/SignatureCapture/app/build/intermediates/packaged/debug/classes.zip' is an invalid library\n    at com.android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.java:113)\n    at com.android.builder.core.AndroidBuilder.convertByteCodeUsingJackApis(AndroidBuilder.java:1821)\n    at com.android.builder.core.AndroidBuilder.convertByteCodeUsingJack(AndroidBuilder.java:1648)\n    at com.android.build.gradle.internal.transforms.JackTransform.runJack(JackTransform.java:220)\n    at com.android.build.gradle.internal.transforms.JackTransform.transform(JackTransform.java:194)\n    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:177)\n    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:173)\n    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)\n    at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:172)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:498)\n    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)\n    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)\n```\n"}}
{"actor":{"display_login":"sbosley"}}