Skip to content

Commit

Permalink
APL-VH-Android: Initial release of APL 1.9 compliant Android Viewhost…
Browse files Browse the repository at this point in the history
… :(1.9.0)
  • Loading branch information
pranavsu1997 committed Feb 16, 2022
1 parent 5e4410f commit 492a604
Show file tree
Hide file tree
Showing 4,478 changed files with 1,206,690 additions and 5,466 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
opensource-codeofconduct@amazon.com with any additional questions or comments.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alexa Presentation Language (APL) ViewHost Android version 1.7
# Alexa Presentation Language (APL) ViewHost Android version 1.9

APLViewHostAndroid is a view host implementation for the Android Platform. It consists of
a thin JNI layer that interacts with APL Core Engine for component inflation and command
Expand Down Expand Up @@ -67,4 +67,4 @@ To see a full list of Gradle tasks:
CMake Error at ...APLCoreEngine/thirdparty/thirdparty.cmake:120 (message):
CMake step for googletest failed: 1
```
The `ninja` build tool needs to be available on the `PATH`.
The `ninja` build tool needs to be available on the `PATH`.
5 changes: 5 additions & 0 deletions android-checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
~ SPDX-License-Identifier: Apache-2.0
-->

<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Checkstyle rules for FLUID based on Android's coding guidelines. -->
Expand Down
23 changes: 22 additions & 1 deletion apl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ include(${APL_DEPENDENCIES_DIR}/thirdparty.cmake)

# tools
include_directories(${APL_CORE_DIR}/aplcore)
set(APL_CORE_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
include_directories(${APL_CORE_BUILD_DIR/aplcore/include})

# Extensions framework
include_directories(${APL_CORE_DIR}/extensions/alexaext/include)

set(APL_CORE_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
include(${APL_CORE_DIR}/options.cmake)
include(${APL_CORE_DIR}/tools.cmake)

Expand All @@ -44,6 +48,7 @@ add_library(
src/main/cpp/jnicontent.cpp
src/main/cpp/jniextensionclient.cpp
src/main/cpp/jniextensioncommand.cpp
src/main/cpp/jniextensioncomponent.cpp
src/main/cpp/jniextensioneventhandler.cpp
src/main/cpp/jniextensionfilter.cpp
src/main/cpp/jnirootcontext.cpp
Expand All @@ -56,6 +61,7 @@ add_library(
src/main/cpp/jniscaling.cpp
src/main/cpp/jnimetricstransform.cpp
src/main/cpp/jnigraphic.cpp
src/main/cpp/jnitextmeasurecallback.cpp
src/main/cpp/jnishadowblur.cpp
src/main/cpp/jninoisefilter.cpp
)
Expand Down Expand Up @@ -98,6 +104,9 @@ include_directories(${PEGTL_INCLUDE})
include_directories(${RAPIDJSON_INCLUDE})
include_directories(${YOGA_INCLUDE})

# Common lib includes
include_directories(../common/src/main/cpp/include)

add_custom_target(generate-android-enums ALL
COMMAND cd ${APL_CORE_DIR} && ${ENUMGEN_BIN}
-f "AnimationQuality"
Expand All @@ -106,6 +115,7 @@ add_custom_target(generate-android-enums ALL
-f "ContainerDirection"
-f "DimensionType"
-f "Display"
-f "DisplayState"
-f "EventAudioTrack"
-f "EventControlMediaCommand"
-f "EventDirection"
Expand All @@ -114,6 +124,7 @@ add_custom_target(generate-android-enums ALL
-f "EventReason"
-f "EventScrollAlign"
-f "EventType"
-f "EventMediaType"
-f "FilterType"
-f "FilterProperty"
-f "FlexboxAlign"
Expand Down Expand Up @@ -155,6 +166,7 @@ add_custom_target(generate-android-enums ALL
-f "TextAlign"
-f "TextAlignVertical"
-f "TokenType"
-f "TrackState"
-f "UpdateType"
-f "VectorGraphicAlign"
-f "VectorGraphicScale"
Expand All @@ -165,13 +177,15 @@ add_custom_target(generate-android-enums ALL
-f "SubmitKeyType"
-f "ScreenMode"
-f "Role"
-f "ExtensionComponentResourceState"
-l java -p com.amazon.apl.enums -o ${CMAKE_CURRENT_SOURCE_DIR}/src/main/java/com/amazon/apl/enums
${APL_CORE_DIR}/aplcore/include/action/*.h
${APL_CORE_DIR}/aplcore/include/animation/*.h
${APL_CORE_DIR}/aplcore/include/apl/command/*.h
${APL_CORE_DIR}/aplcore/include/apl/component/*.h
${APL_CORE_DIR}/aplcore/include/apl/content/*.h
${APL_CORE_DIR}/aplcore/include/apl/datagrammar/*.h
${APL_CORE_DIR}/aplcore/include/apl/document/*.h
${APL_CORE_DIR}/aplcore/include/apl/engine/*.h
${APL_CORE_DIR}/aplcore/include/apl/graphic/*.h
${APL_CORE_DIR}/aplcore/include/apl/primitives/*.h
Expand All @@ -183,3 +197,10 @@ add_custom_target(generate-android-enums ALL
)

add_dependencies(apl-jni generate-android-enums)

# ccache
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
8 changes: 5 additions & 3 deletions apl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ tasks.withType(Test) {
jacoco.excludes = ['jdk.internal.ff*']
}

project.buildDir = "../build/apl"

task jacocoTestReport(type: JacocoReport, dependsOn: ['test']) {
def mainSrc = "$project.projectDir/src/main/java"
Expand Down Expand Up @@ -132,11 +131,12 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.core:core:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation project(':common')
implementation (project(':discovery')) { transitive = false }
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:4.2'
testImplementation 'org.robolectric:shadows-httpclient:4.2'
Expand All @@ -151,8 +151,10 @@ dependencies {
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.25.0'
androidTestImplementation project(":commonTest")
androidTestUtil 'androidx.test:orchestrator:1.1.1'
api "com.google.auto.value:auto-value-annotations:1.7"
api 'com.google.guava:guava:27.0.1-jre'
annotationProcessor "com.google.auto.value:auto-value:1.7"
}

Expand All @@ -170,4 +172,4 @@ project.afterEvaluate {
tasks.test.finalizedBy(jacocoTestReport)
}

tasks.build.dependsOn(assembleAndroidTest)
tasks.build.dependsOn(assembleAndroidTest)

0 comments on commit 492a604

Please sign in to comment.