Just tested out this new system and its working perfectly. It takes significantly less time to build the extensions.
BTW, do I need to make any changes in case I want to use any external dependencies in addition to adding them to the lib/deps folder?
PS: I found a bug. When I try to rebuild the extension again after successfully building it, the build fails. (Although, it builds successfully if I perform ant clean
.) Here is the error log:
I’ve replaced BUILD F@ILED to BUILD UNSUCCESSFUL as Discource was not allowing me add word “F@ILED” to my post.
$ ant extensions
Buildfile: e:\Shreyash\AI2-Extensions\build.xml
javac:
[javac] Compiling 3 source files to e:\Shreyash\GitHub\AI2-Extensions\build\classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 7
[javac] warning: [options] source value 7 is obsolete and will be removed in a future release
[javac] warning: [options] target value 7 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings
process:
[java]
[java] Extensions : Generating extensions
[java]
[java] Extensions : Generating files [io.shreyash.snacky]
BUILD UNSUCCESSFUL
e:\Shreyash\GitHub\AI2-Extensions\build.xml:45: java.io.IOException: Unable to create temporary path for extension build
at com.google.appinventor.components.scripts.ExternalComponentGenerator.copyRelatedExternalClasses(ExternalComponentGenerator.java:357)
at com.google.appinventor.components.scripts.ExternalComponentGenerator.generateExternalComponentBuildFiles(ExternalComponentGenerator.java:163)
at com.google.appinventor.components.scripts.ExternalComponentGenerator.generateAllExtensions(ExternalComponentGenerator.java:113)
at com.google.appinventor.components.scripts.ExternalComponentGenerator.main(ExternalComponentGenerator.java:71)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:218)
at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:155)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:861)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:231)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1254)
at org.apache.tools.ant.Main.runBuild(Main.java:830)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Total time: 3 seconds