@@ -311,40 +311,45 @@ public File createProject(boolean wear) throws IOException, SketchException {
311
311
}
312
312
} catch (InterruptedException e ) {}
313
313
314
- File wearAarFile , explodeDir ;
314
+ File aarFile , explodeDir ;
315
315
316
316
// The wear jar is needed even when the app is not a watch face, because on
317
317
// devices with android < 5 the dependencies of the PWatchFace* classes
318
318
// cannot be resolved.
319
319
// TODO: temporary hack until I find a better way to include the wearable aar
320
320
// package included in the SDK:
321
- wearAarFile = new File (sdk .getWearableFolder (), wear_version + "/wearable-" + wear_version + ".aar" );
321
+ aarFile = new File (sdk .getWearableFolder (), wear_version + "/wearable-" + wear_version + ".aar" );
322
322
explodeDir = new File (tmpFolder , "aar" );
323
- AndroidMode .extractClassesJarFromAar (wearAarFile , explodeDir , new File (libsFolder , "wearable-" + wear_version + ".jar" ));
323
+ AndroidMode .extractClassesJarFromAar (aarFile , explodeDir , new File (libsFolder , "wearable-" + wear_version + ".jar" ));
324
324
325
- // Copy support packages (core-utils, compat, fragment, and annotations)
326
- wearAarFile = new File (sdk .getSupportLibrary (), "/support-core-utils/" + support_version + "/support-core-utils-" + support_version + ".aar" );
325
+ // Copy support packages (core-utils, compat, fragment, annotations, and
326
+ // vector-drawable)
327
+ aarFile = new File (sdk .getSupportLibrary (), "/support-core-utils/" + support_version + "/support-core-utils-" + support_version + ".aar" );
327
328
explodeDir = new File (tmpFolder , "aar" );
328
- AndroidMode .extractClassesJarFromAar (wearAarFile , explodeDir , new File (libsFolder , "support-core-utils-" + support_version + ".jar" ));
329
+ AndroidMode .extractClassesJarFromAar (aarFile , explodeDir , new File (libsFolder , "support-core-utils-" + support_version + ".jar" ));
329
330
330
- wearAarFile = new File (sdk .getSupportLibrary (), "/support-compat/" + support_version + "/support-compat-" + support_version + ".aar" );
331
+ aarFile = new File (sdk .getSupportLibrary (), "/support-compat/" + support_version + "/support-compat-" + support_version + ".aar" );
331
332
explodeDir = new File (tmpFolder , "aar" );
332
- AndroidMode .extractClassesJarFromAar (wearAarFile , explodeDir , new File (libsFolder , "support-compat-" + support_version + ".jar" ));
333
+ AndroidMode .extractClassesJarFromAar (aarFile , explodeDir , new File (libsFolder , "support-compat-" + support_version + ".jar" ));
333
334
334
- wearAarFile = new File (sdk .getSupportLibrary (), "/support-fragment/" + support_version + "/support-fragment-" + support_version + ".aar" );
335
+ aarFile = new File (sdk .getSupportLibrary (), "/support-fragment/" + support_version + "/support-fragment-" + support_version + ".aar" );
335
336
explodeDir = new File (tmpFolder , "aar" );
336
- AndroidMode .extractClassesJarFromAar (wearAarFile , explodeDir , new File (libsFolder , "support-fragment-" + support_version + ".jar" ));
337
+ AndroidMode .extractClassesJarFromAar (aarFile , explodeDir , new File (libsFolder , "support-fragment-" + support_version + ".jar" ));
337
338
339
+ aarFile = new File (sdk .getSupportLibrary (), "/support-vector-drawable/" + support_version + "/support-vector-drawable-" + support_version + ".aar" );
340
+ explodeDir = new File (tmpFolder , "aar" );
341
+ AndroidMode .extractClassesJarFromAar (aarFile , explodeDir , new File (libsFolder , "support-vector-drawable-" + support_version + ".jar" ));
342
+
338
343
File compatJarFile = new File (sdk .getSupportLibrary (), "/support-annotations/" + support_version + "/support-annotations-" + support_version + ".jar" );
339
344
Util .copyFile (compatJarFile , new File (libsFolder , "support-annotations-" + support_version + ".jar" ));
340
345
341
346
if (getAppComponent () == FRAGMENT ) {
342
347
////////////////////////////////////////////////////////////////////////
343
348
// first step: extract appcompat library project
344
349
345
- wearAarFile = new File (sdk .getSupportLibrary (), "/appcompat-v7/" + support_version + "/appcompat-v7-" + support_version + ".aar" );
350
+ aarFile = new File (sdk .getSupportLibrary (), "/appcompat-v7/" + support_version + "/appcompat-v7-" + support_version + ".aar" );
346
351
File appCompatFolder = new File (libsFolder , "appcompat" );
347
- AndroidMode .extractFolder (wearAarFile , appCompatFolder , false );
352
+ AndroidMode .extractFolder (aarFile , appCompatFolder , false );
348
353
Util .removeDir (new File (appCompatFolder , "aidl" ));
349
354
Util .removeDir (new File (appCompatFolder , "android" ));
350
355
Util .removeDir (new File (appCompatFolder , "assets" ));
@@ -355,28 +360,6 @@ public File createProject(boolean wear) throws IOException, SketchException {
355
360
Util .copyFile (classesJar , appCompatJar );
356
361
classesJar .delete ();
357
362
358
- // remove aidl
359
- // remove android
360
- // remove annotations
361
- // remove assets
362
- // move classes.jar to libs as android-support-v7-appcompat.jar
363
- // remove jni
364
-
365
-
366
- /*
367
- // Need to add appcompat as a library project (includes v4 support)
368
-
369
- // TODO: the support-v7 library project should be copied from the Android
370
- // Support Repository, and not from the Support Library.
371
- File appCompatFolderSrc = new File(sdk.getSupportLibrary(), "v7/appcompat");
372
- // Delete the project.properties files because Processing will regenerate
373
- // it when building the project
374
- File propFile = new File(appCompatFolderSrc, "project.properties");
375
- propFile.delete();
376
- File appCompatFolder = new File(libsFolder, "appcompat");
377
- Util.copyDir(appCompatFolderSrc, appCompatFolder);
378
- */
379
-
380
363
////////////////////////////////////////////////////////////////////////
381
364
// second step: create library projects
382
365
boolean appCompatRes = createLibraryProject ("appcompat" , targetID ,
@@ -397,7 +380,6 @@ public File createProject(boolean wear) throws IOException, SketchException {
397
380
writeBuildXML (appCompatBuildFile , "appcompat" );
398
381
}
399
382
}
400
-
401
383
}
402
384
403
385
// Copy any imported libraries (their libs and assets),
0 commit comments