Commits

Anonymous committed bcdcf45

0.4.1rc0

Comments (0)

Files changed (6)

     "license": "BSD",
     "tags": [ "protobuf", "serialization", "cross", "neko", "flash", "js", "cpp", "java", "php" ],
     "description": "Crossplatform implementation of 'Google's Protocol Buffers' for haxe.",
-    "version": "0.4.0",
-    "releasenote": "Drop haxe 2.10 support. Cleanup for haxe 3.1.",
+    "version": "0.4.1rc0",
+    "releasenote": "Update for haxe 3.1.x",
     "contributors": [ "nitrobin" ],
     "dependencies": {}
 }

samples/01-core/build-java.hxml

 
 --next
 
--resource assets/plugin_proto_input@plugin_proto_input
+#-resource assets/plugin_proto_input@plugin_proto_input
 -main Main
 -cp src
 -cp out/src-gen
 -java out/java
 
 --next
-
--cmd java -jar out/java/java.jar -cp assets
+-cmd pwd
+-cmd cp assets/plugin_proto_input out/java/plugin_proto_input
+-cmd cd out/java/
+-cmd java -jar Main-Debug.jar -cp .

samples/01-core/build-js.hxml

 --next
 
 #-cmd phantomjs out/Main.js
--cmd node out/Main.js
+-cmd nodejs out/Main.js

samples/01-core/src/Main.hx

 class TestLargeData extends haxe.unit.TestCase {
     public function getBytes():Bytes {
         #if java
-            return sys.io.File.getBytes("assets/plugin_proto_input");
+            return sys.io.File.getBytes("plugin_proto_input");
         #else
         return haxe.Resource.getBytes("plugin_proto_input");
         #end
         assertEquals("1.0", foo.version);
     }
 
-}
+}

tools/plugin/bin/plugin.jar

Binary file modified.

tools/plugin/src/protohx/Proto2Haxe.java

                     return "new " + typeScope.fullName.substring(
                             typeScope.fullName.lastIndexOf('.') + 1) + "()";
                 }
-                return typeScope.fullName;
+                return "new " + typeScope.fullName + "()";
             case TYPE_BYTES:
                 return "defaultBytes()";
             default: