I created a new discussion.controller.js and calendar.controller.js file. I placed the appropriate script tags for both in the index.html file. I also made changes to distributionUrl in \platforms\android\cordova\lib\builders\GradleBuilder.js and set it to process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'http\://services.gradle.org/distributions/gradle-2.14-all.zip'; (latest version of gradle so far). Last change was done for myself on my local machine so I can load the app onto my Android device.
JAVA_HOME has to also be set on your computer (if you run Windows) to the path where the java.exe file resides (for the latest version of JAVA you are running). This is needed so that the files \platforms\android\gradlew.bat and \platforms\android\cordova\lib\check_reqs.js can set the JAVA_HOME variable properly.
I created a new discussion.controller.js and calendar.controller.js file. I placed the appropriate script tags for both in the index.html file. I also made changes to distributionUrl in \platforms\android\cordova\lib\builders\GradleBuilder.js and set it to process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'http\://services.gradle.org/distributions/gradle-2.14-all.zip'; (latest version of gradle so far). Last change was done for myself on my local machine so I can load the app onto my Android device.
JAVA_HOME has to also be set on your computer (if you run Windows) to the path where the java.exe file resides (for the latest version of JAVA you are running). This is needed so that the files \platforms\android\gradlew.bat and \platforms\android\cordova\lib\check_reqs.js can set the JAVA_HOME variable properly.