Skip to content

Merging SDKUpdater improvements and latest fixes #720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b0a409c
Update build.gradle
rupeshkumar22 Nov 4, 2022
a6019a1
Update version.properties
rupeshkumar22 Nov 4, 2022
c7b62fb
Update SDKUpdater.java
rupeshkumar22 Nov 4, 2022
e7574ed
Update build.gradle
rupeshkumar22 Dec 18, 2022
a878696
Added necessary jars at vr/libs
rupeshkumar22 Dec 18, 2022
584841e
Update `vr/build.gradle`
rupeshkumar22 Dec 18, 2022
66e563f
Merge pull request #713 from rupeshkumar22/SDKUpdaterImprovements
codeanticode Dec 31, 2022
38ce213
roll over version
codeanticode Dec 31, 2022
47b3623
Renamed projects in Eclipse files to facilitate import
codeanticode Jan 8, 2023
cf4a0ce
added the dependencies needed by sdkupdater project in Eclipse
codeanticode Jan 8, 2023
e3b5554
increase version number
codeanticode Jan 8, 2023
c5fccec
added additional deps required by the mode in the Eclipse project
codeanticode Jan 8, 2023
a8de2f1
change source compliance to 1.8
codeanticode Jan 8, 2023
7b20b2e
adding new setting files required by Eclipse
codeanticode Jan 8, 2023
5e9370c
usew newer device defs
codeanticode Jan 8, 2023
a4f9eeb
renamed locateSysImage method to requestSysImage
codeanticode Jan 8, 2023
806def2
add skin argument to create avd command
codeanticode Jan 8, 2023
0a211e5
get all lines from dummy creation
codeanticode Jan 8, 2023
9f5b33c
remoed sd card size from avd creation
codeanticode Jan 9, 2023
282794c
adding latest repository files
codeanticode Jan 9, 2023
49541d8
added copyDir method
codeanticode Jan 9, 2023
e254f20
added a few device art resources
codeanticode Jan 9, 2023
2ad6507
copy device art to SDK folder if not present
codeanticode Jan 9, 2023
85d0c3f
copy resources to build folder
codeanticode Jan 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ task dist {
FileUtils.copyDirectory(file("mode/languages"),
file("${root}/languages"))

FileUtils.copyDirectory(file("mode/resources"),
file("${root}/resources"))

FileUtils.copyDirectory(file("mode/tools/SDKUpdater/tool"),
file("${root}/tools/SDKUpdater/tool"))
FileUtils.copyDirectory(file("mode/tools/SDKUpdater/lib"),
Expand Down
9 changes: 8 additions & 1 deletion mode/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing4-app"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing4-core"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing4-java"/>
<classpathentry kind="var" path="ANDROID_JAR"/>
<classpathentry kind="var" path="ANDROID_SDK"/>
<classpathentry kind="lib" path="mode/gradle-tooling-api-7.2.jar"/>
<classpathentry kind="lib" path="mode/jdi.jar"/>
<classpathentry kind="lib" path="mode/jdimodel.jar"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
2 changes: 1 addition & 1 deletion mode/.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>mode</name>
<name>android-mode</name>
<comment></comment>
<projects>
</projects>
Expand Down
2 changes: 2 additions & 0 deletions mode/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=
eclipse.preferences.version=1
9 changes: 6 additions & 3 deletions mode/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
23 changes: 14 additions & 9 deletions mode/libraries/vr/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ plugins {
dependencies {
compileOnly name: "android"
compileOnly "org.p5android:processing-core:${modeVersion}"
implementationAar "com.google.vr:sdk-audio:${gvrVersion}"
implementationAar "com.google.vr:sdk-base:${gvrVersion}"

// commenting due to issue #718
// implementationAar "com.google.vr:sdk-audio:${gvrVersion}"
// implementationAar "com.google.vr:sdk-base:${gvrVersion}"

// fix for Issue #718
implementationAar fileTree(dir: "libs", include: ["*.aar"])
}

task sourceJar(type: Jar, dependsOn: classes) {
Expand Down Expand Up @@ -53,35 +58,35 @@ compileJava.doFirst {
libFolder.mkdirs()
for (String fn : deps) {
Files.copy(file("${rootDir}/build/libs/" + fn).toPath(),
file("library/" + fn).toPath(), REPLACE_EXISTING);
file("library/" + fn).toPath(), REPLACE_EXISTING);
}
}

build.doLast {
// Copying vr jar to library folder
File vrJar = file("library/vr.jar")
vrJar.mkdirs();

// Need to check the existance of the files before using as the files
// will get generated only if Task ':mode:libraries:vr:jar' is not being skipped
// Task ':mode:libraries:vr:jar' will be skipped if source files are unchanged or jar task is UP-TO-DATE

if (file("$buildDir/libs/vr.jar").exists()) {
Files.copy(file("$buildDir/libs/vr.jar").toPath(),
vrJar.toPath(), REPLACE_EXISTING);
vrJar.toPath(), REPLACE_EXISTING);
}
// Renaming artifacts for maven publishing
if (file("$buildDir/libs/vr.jar").exists()) {
Files.move(file("$buildDir/libs/vr.jar").toPath(),
file("$buildDir/libs/processing-vr-${vrLibVersion}.jar").toPath(), REPLACE_EXISTING);
file("$buildDir/libs/processing-vr-${vrLibVersion}.jar").toPath(), REPLACE_EXISTING);
}
if (file("$buildDir/libs/vr-sources.jar").exists()) {
Files.move(file("$buildDir/libs/vr-sources.jar").toPath(),
file("$buildDir/libs/processing-vr-${vrLibVersion}-sources.jar").toPath(), REPLACE_EXISTING);
file("$buildDir/libs/processing-vr-${vrLibVersion}-sources.jar").toPath(), REPLACE_EXISTING);
}
if (file("$buildDir/libs/vr.jar.MD5").exists()) {
Files.move(file("$buildDir/libs/vr.jar.MD5").toPath(),
file("$buildDir/libs/processing-vr-${vrLibVersion}.jar.md5").toPath(), REPLACE_EXISTING);
file("$buildDir/libs/processing-vr-${vrLibVersion}.jar.md5").toPath(), REPLACE_EXISTING);
}
}

Expand Down
Binary file added mode/libraries/vr/libs/sdk-audio-1.180.0.aar
Binary file not shown.
Binary file added mode/libraries/vr/libs/sdk-base-1.180.0.aar
Binary file not shown.
Binary file added mode/libraries/vr/libs/sdk-common-1.180.0.aar
Binary file not shown.
4 changes: 2 additions & 2 deletions mode/mode.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ url = http://android.processing.org
sentence = This mode lets you use Processing to create Android apps
paragraph =
imports=processing.mode.java.JavaMode
version = 406
prettyVersion = 4.5.0b2
version = 407
prettyVersion = 4.5.0b3
minRevision = 1283
maxRevision = 0

154 changes: 154 additions & 0 deletions mode/resources/device-art-resources/device-art.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<devices>

<device id="pixel_2" name="Pixel 2">
<orientation name="port" size="1370,2534" screenPos="140,280" screenSize="1080,1920" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="2596,1258" screenPos="338,68" screenSize="1920,1080" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="pixel_2_xl" name="Pixel 2 XL">
<orientation name="port" size="1858,3456" screenPos="201,245" screenSize="1440,2880" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="3477,1754" screenPos="305,108" screenSize="2880,1440" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="pixel" name="Pixel">
<orientation name="port" size="1370,2534" screenPos="139,285" screenSize="1080,1920" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="2596,1258" screenPos="338,78" screenSize="1920,1080" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="pixel_silver" name="Pixel Silver">
<orientation name="port" size="1370,2534" screenPos="139,285" screenSize="1080,1920" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="2596,1258" screenPos="338,78" screenSize="1920,1080" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="pixel_xl" name="Pixel XL">
<orientation name="port" size="1840,3297" screenPos="200,325" screenSize="1440,2560" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="3427,1654" screenPos="393,92" screenSize="2560,1440" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="pixel_xl_silver" name="Pixel XL Silver">
<orientation name="port" size="1840,3297" screenPos="200,325" screenSize="1440,2560" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="3427,1654" screenPos="393,92" screenSize="2560,1440" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="pixel_c" name="Pixel C">
<orientation name="port" size="2307,2971" screenPos="259,181" screenSize="1800,2560" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="3096,2215" screenPos="269,188" screenSize="2560,1800" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_5x" name="Nexus 5X">
<orientation name="port" size="1370,2446" screenPos="147,233" screenSize="1080,1920" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="2497,1234" screenPos="278,63" screenSize="1920,1080" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_6p" name="Nexus 6P">
<orientation name="port" size="1840,3251" screenPos="195,329" screenSize="1440,2560" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="3427,1620" screenPos="442,71" screenSize="2560,1440" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="watch_square" name="Watch Square">
<orientation name="port" size="474,403" screenPos="100,38" screenSize="280,280" shadow="shadow.png" back="back.png" lights="fore.png" mask="mask.png"/>
<orientation name="land" size="474,403" screenPos="100,38" screenSize="280,280" shadow="shadow.png" back="back.png" lights="fore.png" mask="mask.png"/>
</device>

<device id="watch_round" name="Watch Round">
<orientation name="port" size="370,424" screenPos="25,26" screenSize="320,320" shadow="shadow.png" back="back.png" lights="fore.png" mask="mask.png"/>
<orientation name="land" size="370,424" screenPos="25,26" screenSize="320,320" shadow="shadow.png" back="back.png" lights="fore.png" mask="mask.png"/>
</device>

<device id="tv_1080p" name="Android TV 1080p">
<orientation name="land" size="2090,1255" screenPos="85,59" screenSize="1920,1080" shadow="shadow.png" back="back.png" lights="fore.png"/>
</device>

<device id="tv_4k" name="Android TV 4K">
<orientation name="land" size="4180,2510" screenPos="170,118" screenSize="3840,2160" shadow="shadow.png" back="back.png" lights="fore.png"/>
</device>

<device id="tv_720p" name="Android TV 720p">
<orientation name="land" size="1394,837" screenPos="57,39" screenSize="1280,720" shadow="shadow.png" back="back.png" lights="fore.png"/>
</device>

<device id="nexus_9" name="Nexus 9">
<orientation name="port" size="1978,2631" screenPos="219,264" screenSize="1536,2048" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="2854,1785" screenPos="401,100" screenSize="2048,1536" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_6" name="Nexus 6">
<orientation name="port" size="1896,3054" screenPos="229,239" screenSize="1440,2560" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="3142,1639" screenPos="318,76" screenSize="2560,1440" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_5" name="Nexus 5">
<orientation name="port" size="1370,2405" screenPos="144,195" screenSize="1080,1920" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="2497,1235" screenPos="261,65" screenSize="1920,1080" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_4" name="Nexus 4">
<orientation name="port" size="958,1678" screenPos="94,187" screenSize="768,1280" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="1799,885" screenPos="257,45" screenSize="1280,768" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_7_2013" name="Nexus 7">
<orientation name="port" size="1596,2571" screenPos="195,301" screenSize="1200,1920" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="2772,1479" screenPos="423,120" screenSize="1920,1200" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_7" name="Nexus 7 (2012)">
<orientation name="port" size="1094,1689" screenPos="142,190" screenSize="800,1280" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="1803,1045" screenPos="260,105" screenSize="1280,800" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_10" name="Nexus 10">
<orientation name="port" size="2330,3136" screenPos="366,266" screenSize="1600,2560" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="3340,2176" screenPos="388,266" screenSize="2560,1600" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="xoom" name="Motorola XOOM">
<orientation name="port" size="1170,1471" screenPos="185,83" screenSize="800,1280" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="1569,998" screenPos="152,89" screenSize="1280,800" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="galaxy_nexus" name="Galaxy Nexus">
<orientation name="port" size="1101,1709" screenPos="192,213" screenSize="720,1280" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="1847,886" screenPos="304,68" screenSize="1280,720" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_s" name="Nexus S">
<orientation name="port" size="719,1139" screenPos="119,160" screenSize="480,800" shadow="port_shadow.webp" back="port_back.webp" lights="port_fore.webp"/>
<orientation name="land" size="1210,586" screenPos="208,44" screenSize="800,480" shadow="land_shadow.webp" back="land_back.webp" lights="land_fore.webp"/>
</device>

<device id="nexus_one" name="Nexus One">
<orientation name="port" size="732,1178" screenPos="125,131" screenSize="480,800" shadow="port_shadow.webp" back="port_back.webp"/>
<orientation name="land" size="1300,612" screenPos="200,52" screenSize="800,480" shadow="land_shadow.webp" back="land_back.webp"/>
</device>

<device id="phone" name="Generic Phone">
<orientation name="port" size="568,256" screenPos="113,93" screenSize="343,46" shadow="phone_shadow_simple_port.9.png" back="phone_back_simple_port.9.png"/>
<orientation name="land" size="607,350" screenPos="141,36" screenSize="324,255" shadow="phone_shadow_simple_land.9.png" back="phone_back_simple_land.9.png"/>
</device>

<device id="tablet" name="Generic Tablet">
<orientation name="port" size="1310,313" screenPos="256,111" screenSize="802,55" shadow="tablet_shadow_simple_port.9.png" back="tablet_back_simple.9.png"/>
<orientation name="land" size="1310,313" screenPos="256,111" screenSize="802,55" shadow="tablet_shadow_simple_land.9.png" back="tablet_back_simple.9.png"/>
</device>

<device id="automotive_1024" name="Automotive">
<orientation name="land" size="1461,1481" screenPos="218,124" screenSize="1024,768" back="back.png" lights="fore.png"/>
</device>

</devices>
38 changes: 38 additions & 0 deletions mode/resources/device-art-resources/pixel_3/layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
parts {
device {
display {
width 1080
height 2160
x 0
y 0
}
}
portrait {
background {
image port_back.webp
}
foreground {
mask round_corners.webp
}
onion {
image port_fore.webp
}
}
}
layouts {
portrait {
width 1194
height 2532
event EV_SW:0:1
part1 {
name portrait
x 0
y 0
}
part2 {
name device
x 54
y 196
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
36 changes: 36 additions & 0 deletions mode/resources/device-art-resources/pixel_6/layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
parts {
device {
display {
width 1080
height 2400
x 0
y 0
}
}
portrait {
background {
image back.webp
}
foreground {
mask mask.webp
cutout hole
}
}
}
layouts {
portrait {
width 1209
height 2553
event EV_SW:0:1
part1 {
name portrait
x 0
y 0
}
part2 {
name device
x 60
y 69
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading