You need to make sure that you generate the YAIL before exporting the project. The build server does not do the YAIL generation for you. The option to generate the project YAIL is available under the Build menu if you're logged in as an administrator.
For my particular use case, I need to automate the process of building apk from aia. So, is there anyway to login as admin, generate yail from a sequence of command-line commands?
I modified the buildserver code to not treat the NO_USER_CODE as an error and doing so resulted in the gradle build being successful and apk got generated in the target directory. My question is, is there any side effect of apks built using this process( i.e bypassing the NO_USER_CODE_ERROR) ?
Because the error indicates that the AIA doesn't contain the YAIL files, I don't expect the final compiled APK would run successfully. Also, I am not sure about your reference to gradle--App Inventor doesn't use gradle so I'm not sure how this factors in. Code generation is done in the user's browser when they opt to compile their app. We might be able to better advise if we have a sense of why you need to automate compiling so many apps.
My reference to gradle was a mistake. I mean't the 'ant build' instead of the 'gradle build', I am so sorry.
I'll explain my use-case.
We are building a NLP based system where, we build apps from text-based description of the app. You can read more about it here: Text2App
Our model predicts and generates the .scm and .bky files under the hood and creates an .aia file. Everything upto this can be done from just one command line command.
But, for this to be called an actual app. We need to generate an ".apk". Currently, users drop the .aia file (generated from our system) into the MIT app inventor web UI and generate the .apk. But, this is not good for user experience. Since, users have to get their app in 2 steps. First build .aia then generate .apk from .aia. Therefore, we are looking for a way to generate .apk from .aia only using command line commands. So, we can automate the entire process.
Is there a way to complete the "YAIL" generation, only using command line commands? Instead of some GUI.
Ok, that helps. We're familiar with your project and it's pretty cool. We're also working on something similar.
You should be able to do this on a server. There are some tests for the code generator in the blocklyeditor module that are used to verify that we don't break the YAIL codegen. The tests are implemented in Javascript and have a Java wrapper that invokes them, but you'd likely just want to write the Javascript to read the scm/bky files and then write out the YAIL file. Once you've got that, you can then compose the AIA for compilation with the buildserver.
Here's an example of how the MoleMash code generation is verified:
Thank you so much. This directly points me to what I need to do.
However, this seems quite coupled with the ai codebase. I am not quite sure doing it like the moleMashTest.js would be the optimal way to do it for me, for my simple use case of converting scm&bky to yail.
Would have been great if there was sth like a library/jar/API which takes the .scm and .bky files as input and outputs the corresponding .yail file. Is there something like this?
If not, then is there some documentation regarding what .yail really is(i.e the rules for conversion). This will help me consider if I should write a scm&bky to yail converter from scratch. I made some trial & error using the GUI menu item "Generate Yail" and it helped get an idea of what it is. But, to write a full scm&bky to yail converter from scratch i might need to know the full domain.
All of the code gen is done on the client (i.e., in the browser). The code above is simply importing a wrapper HTML that can take the scm/bky file and convert it to yail. You could probably write a node.js wrapper that imports the JavaScript directly and then provides a conversion from scm/bky to yail, but that's more work than just adapting the code above.