Skip to content

Commit 9847dde

Browse files
committed
support-core-utils is actually not needed in core
1 parent 25f384f commit 9847dde

File tree

3 files changed

+17
-36
lines changed

3 files changed

+17
-36
lines changed

core/.classpath

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
<classpathentry kind="lib" path="library/support-annotations-25.2.0.jar"/>
77
<classpathentry kind="lib" path="library/support-compat-25.2.0.jar"/>
88
<classpathentry kind="lib" path="library/support-fragment-25.2.0.jar"/>
9-
<classpathentry kind="lib" path="library/support-core-utils-25.2.0.jar"/>
109
<classpathentry kind="output" path="bin"/>
1110
</classpath>
-102 KB
Binary file not shown.

src/processing/mode/android/AndroidBuild.java

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -311,40 +311,45 @@ public File createProject(boolean wear) throws IOException, SketchException {
311311
}
312312
} catch (InterruptedException e) {}
313313

314-
File wearAarFile, explodeDir;
314+
File aarFile, explodeDir;
315315

316316
// The wear jar is needed even when the app is not a watch face, because on
317317
// devices with android < 5 the dependencies of the PWatchFace* classes
318318
// cannot be resolved.
319319
// TODO: temporary hack until I find a better way to include the wearable aar
320320
// 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");
322322
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"));
324324

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");
327328
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"));
329330

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");
331332
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"));
333334

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");
335336
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"));
337338

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+
338343
File compatJarFile = new File(sdk.getSupportLibrary(), "/support-annotations/" + support_version + "/support-annotations-" + support_version + ".jar");
339344
Util.copyFile(compatJarFile, new File(libsFolder, "support-annotations-" + support_version + ".jar"));
340345

341346
if (getAppComponent() == FRAGMENT) {
342347
////////////////////////////////////////////////////////////////////////
343348
// first step: extract appcompat library project
344349

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");
346351
File appCompatFolder = new File(libsFolder, "appcompat");
347-
AndroidMode.extractFolder(wearAarFile, appCompatFolder, false);
352+
AndroidMode.extractFolder(aarFile, appCompatFolder, false);
348353
Util.removeDir(new File(appCompatFolder, "aidl"));
349354
Util.removeDir(new File(appCompatFolder, "android"));
350355
Util.removeDir(new File(appCompatFolder, "assets"));
@@ -355,28 +360,6 @@ public File createProject(boolean wear) throws IOException, SketchException {
355360
Util.copyFile(classesJar, appCompatJar);
356361
classesJar.delete();
357362

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-
380363
////////////////////////////////////////////////////////////////////////
381364
// second step: create library projects
382365
boolean appCompatRes = createLibraryProject("appcompat", targetID,
@@ -397,7 +380,6 @@ public File createProject(boolean wear) throws IOException, SketchException {
397380
writeBuildXML(appCompatBuildFile, "appcompat");
398381
}
399382
}
400-
401383
}
402384

403385
// Copy any imported libraries (their libs and assets),

0 commit comments

Comments
 (0)