@@ -48,21 +48,21 @@ class AndroidBuild extends JavaBuild {
4848 static public final int FRAGMENT = 0 ;
4949 static public final int WALLPAPER = 1 ;
5050 static public final int WATCHFACE = 2 ;
51- static public final int CARDBOARD = 3 ;
51+ static public final int VR = 3 ;
5252
5353 static public final String DEFAULT_COMPONENT = "app" ;
5454
5555 static private final String FRAGMENT_ACTIVITY_TEMPLATE = "FragmentActivity.java.tmpl" ;
5656 static private final String WALLPAPER_SERVICE_TEMPLATE = "WallpaperService.java.tmpl" ;
5757 static private final String WATCHFACE_SERVICE_TEMPLATE = "WatchFaceService.java.tmpl" ;
58- static private final String CARDBOARD_ACTIVITY_TEMPLATE = "CardboardActivity .java.tmpl" ;
58+ static private final String VR_ACTIVITY_TEMPLATE = "VRActivity .java.tmpl" ;
5959 static private final String HANDHELD_ACTIVITY_TEMPLATE = "HandheldActivity.java.tmpl" ;
6060 static private final String HANDHELD_MANIFEST_TEMPLATE = "HandheldManifest.xml.tmpl" ;
6161 static private final String HANDHELD_LAYOUT_TEMPLATE = "HandheldLayout.xml.tmpl" ;
6262 static private final String WEARABLE_DESCRIPTION_TEMPLATE = "WearableDescription.xml.tmpl" ;
6363 static private final String LAYOUT_ACTIVITY_TEMPLATE = "LayoutActivity.xml.tmpl" ;
6464 static private final String STYLES_FRAGMENT_TEMPLATE = "StylesFragment.xml.tmpl" ;
65- static private final String STYLES_CARDBOARD_TEMPLATE = "StylesCardboard .xml.tmpl" ;
65+ static private final String STYLES_VR_TEMPLATE = "StylesVR .xml.tmpl" ;
6666 static private final String XML_WALLPAPER_TEMPLATE = "XMLWallpaper.xml.tmpl" ;
6767 static private final String STRINGS_WALLPAPER_TEMPLATE = "StringsWallpaper.xml.tmpl" ;
6868 static private final String XML_WATCHFACE_TEMPLATE = "XMLWatchFace.xml.tmpl" ;
@@ -74,7 +74,7 @@ class AndroidBuild extends JavaBuild {
7474 static private final String APP_GRADLE_BUILD_TEMPLATE = "FragmentBuild.gradle.tmpl" ;
7575 static private final String HANDHELD_GRADLE_BUILD_TEMPLATE = "HandheldBuild.gradle.tmpl" ;
7676 static private final String WEARABLE_GRADLE_BUILD_TEMPLATE = "WearableBuild.gradle.tmpl" ;
77- static private final String CARDBOARD_GRADLE_BUILD_TEMPLATE = "CardboardBuild .gradle.tmpl" ;
77+ static private final String VR_GRADLE_BUILD_TEMPLATE = "VRBuild .gradle.tmpl" ;
7878
7979 // TODO: ask base package name when exporting signed apk
8080 // static final String basePackage = "changethispackage.beforesubmitting.tothemarket";
@@ -91,7 +91,7 @@ class AndroidBuild extends JavaBuild {
9191 // which allows us to exactly determine the size of the screen.
9292 static public final String min_sdk_fragment = "16" ; // Jelly Bean (4.1)
9393 static public final String min_sdk_wallpaper = "16" ; //
94- static public final String min_sdk_cardboard = "19" ; // KitKat (4.4)
94+ static public final String min_sdk_gvr = "19" ; // KitKat (4.4)
9595 static public final String min_sdk_handheld = "21" ; // Lollipop (5.0)
9696 static public final String min_sdk_watchface = "23" ; // Marshmallow (6.0)
9797
@@ -269,7 +269,7 @@ public File createProject(String targetID, boolean wear)
269269 if (getAppComponent () == FRAGMENT ) {
270270 copyAppCompatLib (targetID , tmpFolder , libsFolder );
271271 }
272- if (getAppComponent () == CARDBOARD ) {
272+ if (getAppComponent () == VR ) {
273273 copyGVRLibs (targetID , libsFolder );
274274 }
275275
@@ -923,9 +923,9 @@ private void writeRes(File resFolder) throws SketchException {
923923 writeResStringsWallpaper (valuesFolder );
924924 }
925925
926- if (comp == CARDBOARD ) {
926+ if (comp == VR ) {
927927 File valuesFolder = mkdirs (resFolder , "values" );
928- writeResStylesCardboard (valuesFolder );
928+ writeResStylesVR (valuesFolder );
929929 }
930930
931931 File sketchFolder = sketch .getFolder ();
@@ -1099,8 +1099,8 @@ private void writeMainClass(final File srcDirectory, String renderer) {
10991099 } else {
11001100 writeWatchFaceCanvasService (srcDirectory , permissions );
11011101 }
1102- } else if (comp == CARDBOARD ) {
1103- writeCardboardActivity (srcDirectory , permissions );
1102+ } else if (comp == VR ) {
1103+ writeVRActivity (srcDirectory , permissions );
11041104 }
11051105 }
11061106
@@ -1155,8 +1155,8 @@ private void writeWatchFaceCanvasService(final File srcDirectory, String[] permi
11551155 }
11561156
11571157
1158- private void writeCardboardActivity (final File srcDirectory , String [] permissions ) {
1159- File javaTemplate = mode .getContentFile ("templates/" + CARDBOARD_ACTIVITY_TEMPLATE );
1158+ private void writeVRActivity (final File srcDirectory , String [] permissions ) {
1159+ File javaTemplate = mode .getContentFile ("templates/" + VR_ACTIVITY_TEMPLATE );
11601160 File javaFile = new File (new File (srcDirectory , getPackageName ().replace ("." , "/" )), "MainActivity.java" );
11611161
11621162 HashMap <String , String > replaceMap = new HashMap <String , String >();
@@ -1185,8 +1185,8 @@ private void writeResStylesFragment(final File valuesFolder) {
11851185 }
11861186
11871187
1188- private void writeResStylesCardboard (final File valuesFolder ) {
1189- File xmlTemplate = mode .getContentFile ("templates/" + STYLES_CARDBOARD_TEMPLATE );
1188+ private void writeResStylesVR (final File valuesFolder ) {
1189+ File xmlTemplate = mode .getContentFile ("templates/" + STYLES_VR_TEMPLATE );
11901190 File xmlFile = new File (valuesFolder , "styles.xml" );
11911191 AndroidMode .createFileFromTemplate (xmlTemplate , xmlFile );
11921192 }
@@ -1360,9 +1360,9 @@ private void createAppModule(File projectFolder, File exportFolder, String build
13601360
13611361 String minSdk ;
13621362 String tmplFile ;
1363- if (appComponent == CARDBOARD ) {
1364- minSdk = min_sdk_cardboard ;
1365- tmplFile = CARDBOARD_GRADLE_BUILD_TEMPLATE ;
1363+ if (appComponent == VR ) {
1364+ minSdk = min_sdk_gvr ;
1365+ tmplFile = VR_GRADLE_BUILD_TEMPLATE ;
13661366 } else {
13671367 minSdk = min_sdk_fragment ;
13681368 tmplFile = APP_GRADLE_BUILD_TEMPLATE ;
@@ -1389,9 +1389,9 @@ private void createAppModule(File projectFolder, File exportFolder, String build
13891389 File libsFolder = mkdirs (moduleFolder , "libs" );
13901390 Util .copyFile (coreFile , new File (libsFolder , "processing-core.jar" ));
13911391
1392- if (appComponent == CARDBOARD ) {
1393- File cardboardFile = new File (projectFolder , "libs/cardboard .jar" );
1394- Util .copyFile (cardboardFile , new File (libsFolder , "cardboard .jar" ));
1392+ if (appComponent == VR ) {
1393+ File vrFile = new File (projectFolder , "libs/vr .jar" );
1394+ Util .copyFile (vrFile , new File (libsFolder , "vr .jar" ));
13951395 }
13961396
13971397 File mainFolder = mkdirs (moduleFolder , "src/main" );
@@ -1551,15 +1551,15 @@ private void copyAppCompatLib(String targetID, File tmpFolder, File libsFolder)
15511551 }
15521552
15531553 private void copyGVRLibs (String targetID , File libsFolder ) throws IOException {
1554- // TODO: temporary hack until I find a better way to include the cardboard aar
1555- // packages included in the cardboard SDK:
1554+ // TODO: temporary hack until I find a better way to include the VR aar
1555+ // packages included in the GVR SDK:
15561556
15571557 ////////////////////////////////////////////////////////////////////////
1558- // first step: unpack the cardboard packages in the project's
1558+ // first step: unpack the VR packages in the project's
15591559 // libs folder:
1560- File baseZipFile = mode .getContentFile ("libraries/cardboard /gvrsdk/" + gvr_sdk_version + "/sdk-base.zip" );
1561- File commonZipFile = mode .getContentFile ("libraries/cardboard /gvrsdk/" + gvr_sdk_version + "/sdk-common.zip" );
1562- File audioZipFile = mode .getContentFile ("libraries/cardboard /gvrsdk/" + gvr_sdk_version + "/sdk-audio.zip" );
1560+ File baseZipFile = mode .getContentFile ("libraries/vr /gvrsdk/" + gvr_sdk_version + "/sdk-base.zip" );
1561+ File commonZipFile = mode .getContentFile ("libraries/vr /gvrsdk/" + gvr_sdk_version + "/sdk-common.zip" );
1562+ File audioZipFile = mode .getContentFile ("libraries/vr /gvrsdk/" + gvr_sdk_version + "/sdk-audio.zip" );
15631563 AndroidMode .extractFolder (baseZipFile , libsFolder , true );
15641564 AndroidMode .extractFolder (commonZipFile , libsFolder , true );
15651565 AndroidMode .extractFolder (audioZipFile , libsFolder , true );
0 commit comments