Let me provide some context:
I created a standalone project call "Contact Form". Within this project, I created 2 scripts called "Script1" and "Script2". For "Script1", I use the GUI Builder to create a form. For "Script2", I created another form, this time in code. Both of these scripts call the "doGet()" function.
Anyway, I published "Script1" as a web app, click on the URL and everything is there. Perfect! Now here comes the problem that got me confused. When I publish "Script2" as a web app, the web app URL takes me to "Script1" web app, WHAT!? I'd only see "Script2" web app if I click on "test web app for latest code" link.
Why is this? So my question is this?
Can you publish 2 web apps using 1 project like the way I have it setup? If you could, how are the resources being shared between the 2 web apps?
I know in order to deploy a script as a web app, it must contain the doGet(e) function. How does a project handle multiple files with doGet() functions?
Basically I am confused with project, multiple files within a project, and web app deployment within a project. I read the Google App Scripts Documentation from Google but it doesn't provide the clarification I was looking for. If someone cold shed some light on this, I greatly appreciate it.
The purpose of files within a project is to simply separate code for the convenience of the developer. So, if you have two functions with the same name, it is hard to say which one will be executed.
If you want to have two web apps, you must have two different projects. You cannot have them in the same project.