Skip to content

Commit

Permalink
APL-Viewhost: March 2022 Release of APL 1.9 compilant Android Viewhos…
Browse files Browse the repository at this point in the history
…t(1.9.1)
  • Loading branch information
pranavsu1997 committed Mar 25, 2022
1 parent 492a604 commit 630767b
Show file tree
Hide file tree
Showing 661 changed files with 13,800 additions and 24,811 deletions.
41 changes: 41 additions & 0 deletions Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# -*-perl-*-

package.APLViewhostAndroid = {
interfaces = (1.9);

deploy = {
generic = true;
};

build-environment = {
chroot = basic;
network-access = open;
};

build-system = custom-build;
build-tools = {
1.9 = {
BrazilPath = 1.1;
ContainerBuild = 1.2;
ContainerBuildServerAPLKeys = 1.0;
};
};

dependencies = {
1.9 = {
APLCoreEngine = 1.9;
};
};

test-dependencies = {
1.9 = {
# build-tools defined here will be mapped to /opt/build-tools/PackageName inside the build container and added to PATH
};
};

runtime-dependencies = {
1.9 = {
};
};

};
1 change: 1 addition & 0 deletions apl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ add_library(
src/main/cpp/jniextensioncomponent.cpp
src/main/cpp/jniextensioneventhandler.cpp
src/main/cpp/jniextensionfilter.cpp
src/main/cpp/jniextensionmediator.cpp
src/main/cpp/jnirootcontext.cpp
src/main/cpp/jnirootconfig.cpp
src/main/cpp/jnicomponent.cpp
Expand Down
16 changes: 8 additions & 8 deletions apl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@

apply plugin: 'com.android.library'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'

jacoco {
toolVersion = '0.8.2'
}

tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.ff*']
jacoco.excludes = ['jdk.internal.*']
}


task jacocoTestReport(type: JacocoReport, dependsOn: ['test']) {
def mainSrc = "$project.projectDir/src/main/java"

def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*']
def debugTree = fileTree(dir: "$project.buildDir/intermediates/javac/debugUnitTest/", excludes: fileFilter)
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', '**/AutoValue_*.*']
def debugTree = fileTree(dir: "$project.buildDir/intermediates/javac/release/", excludes: fileFilter)

sourceDirectories.from(files([mainSrc]))
classDirectories.from(files(debugTree))
Expand All @@ -30,8 +30,7 @@ task jacocoTestReport(type: JacocoReport, dependsOn: ['test']) {
]))
reports {
xml.enabled = true
xml.destination file("${buildDir}/../documentation/coverage.xml")
html.enabled = false
html.enabled = true
}
}

Expand All @@ -47,7 +46,8 @@ ext {

android {
compileSdkVersion 28
ndkVersion "22.0.7026061"
ndkVersion "23.0.7599858"
buildToolsVersion "30.0.2"
defaultConfig {
minSdkVersion 22
targetSdkVersion 28
Expand All @@ -60,7 +60,7 @@ android {
cmake {
// Sets optional flags for the C++ compiler.
// Enables RTTI (RunTime Type Information) support and C++ exceptions.
cppFlags "-std=c++11 -frtti -fexceptions"
cppFlags "-std=c++11", "-frtti", "-fexceptions", "-DBUILD_ALEXAEXTENSIONS=On", "-DALEXAEXTENSIONS=1"
// Build the APL Core JNI library (excludes all other targets)
targets "apl", "apl-jni"
// Enable APL Core JNI build, and be verbose.
Expand Down
1 change: 0 additions & 1 deletion apl/documentation/coverage.xml

This file was deleted.

5 changes: 4 additions & 1 deletion apl/src/main/cpp/jniapl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ namespace apl {
jboolean graphicLoaded = graphic_OnLoad(vm, reserved);
jboolean jniscalingLoaded = jniscaling_OnLoad(vm, reserved);
jboolean textmeasureLoaded = textmeasurecallback_OnLoad(vm, reserved);
jboolean localExtensionMediatorLoaded = extensionmediator_OnLoad(vm, reserved);

if (!driverLoaded || !contentLoaded || !rootconfigLoaded
|| !complexpropertyLoaded || !eventLoaded || !actionLoaded || !graphicLoaded
|| !jniutilLoaded || !jniscalingLoaded || !textmeasureLoaded) {
|| !jniutilLoaded || !jniscalingLoaded || !textmeasureLoaded
|| !localExtensionMediatorLoaded) {
return JNI_ERR;
}

Expand All @@ -71,6 +73,7 @@ namespace apl {
graphic_OnUnload(vm, reserved);
jniutil_OnUnload(vm, reserved);
textmeasurecallback_OnUnload(vm, reserved);
extensionmediator_OnUnload(vm, reserved);
}

} //namespace jni
Expand Down
20 changes: 20 additions & 0 deletions apl/src/main/cpp/jnirootconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,26 @@ namespace apl {
env->ReleaseStringUTFChars(name_, name);
}

JNIEXPORT void JNICALL
Java_com_amazon_apl_android_RootConfig_nExtensionProvider(JNIEnv *env,
jclass clazz,
jlong nativeHandle,
jlong providerNativeHandle) {
auto rc = get<RootConfig>(nativeHandle);
auto ep = get<alexaext::ExtensionProvider>(providerNativeHandle);
rc->extensionProvider(ep);
}

JNIEXPORT void JNICALL
Java_com_amazon_apl_android_RootConfig_nExtensionMediator(JNIEnv *env,
jclass clazz,
jlong nativeHandle,
jlong mediatorNativeHandle) {
auto rc = get<RootConfig>(nativeHandle);
auto em = get<ExtensionMediator>(mediatorNativeHandle);
rc->extensionMediator(em);
}

JNIEXPORT void JNICALL
Java_com_amazon_apl_android_RootConfig_nRegisterExtensionEventHandler(JNIEnv *env,
jclass clazz,
Expand Down
10 changes: 10 additions & 0 deletions common/.cxx/abi_configuration_6r145855.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"allAbis": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"validAbis": [
"X86"
]
}
1 change: 1 addition & 0 deletions common/.cxx/abi_configuration_6r145855.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading

0 comments on commit 630767b

Please sign in to comment.