Skip to content

Commit

Permalink
feat(android): provide sdk version information
Browse files Browse the repository at this point in the history
  • Loading branch information
iPel authored and hippy-actions[bot] committed May 11, 2023
1 parent cd422d1 commit 3f56119
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
1 change: 1 addition & 0 deletions driver/js/lib/global/Platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if (typeof __HIPPYNATIVEGLOBAL__ !== 'undefined') {
} else {
Hippy.device.platform.OS = __HIPPYNATIVEGLOBAL__.Platform.OS;
Hippy.device.platform.APILevel = __HIPPYNATIVEGLOBAL__.Platform.APILevel;
Hippy.device.platform.SDKVersion = __HIPPYNATIVEGLOBAL__.Platform.SDKVersion;
Hippy.device.platform.Localization = __HIPPYNATIVEGLOBAL__.Platform.Localization || Localization;
}
}
2 changes: 1 addition & 1 deletion driver/js/src/vm/jsc/native_source_code_ios.cc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion driver/js/src/vm/v8/native_source_code_android.cc

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions framework/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ android {
consumerProguardFiles 'proguard-rules.pro'

buildConfigField("boolean", "ENABLE_SO_LOAD_EXTERNAL", ENABLE_SO_LOAD_EXTERNAL)
buildConfigField("String", "LIBRARY_VERSION", "String.valueOf(\"$VERSION_NAME\")")

packagingOptions {
if (!INCLUDE_ABI_ARMEABI.toBoolean()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.openhippy.connector.JsDriver;
import com.openhippy.connector.JsDriver.V8InitParams;
import com.openhippy.connector.NativeCallback;
import com.openhippy.framework.BuildConfig;
import com.tencent.mtt.hippy.HippyEngine;
import com.tencent.mtt.hippy.HippyEngine.ModuleLoadStatus;
import com.tencent.mtt.hippy.HippyEngineContext;
Expand Down Expand Up @@ -550,6 +551,7 @@ String getGlobalConfigs() {
platformParams.pushString("VersionName", (versionName == null) ? "" : versionName);
platformParams.pushInt("APILevel", Build.VERSION.SDK_INT);
platformParams.pushBoolean("NightMode", getNightMode());
platformParams.pushString("SDKVersion", BuildConfig.LIBRARY_VERSION);

HippyMap Localization = new HippyMap();
Localization.pushString("language", I18nUtil.getLanguage());
Expand Down
32 changes: 16 additions & 16 deletions framework/voltron/core/src/bridge/native_source_code_flutter.cc

Large diffs are not rendered by default.

0 comments on commit 3f56119

Please sign in to comment.