Skip to content

Commit f711304

Browse files
author
Nathanael Anderson
authored
Merge pull request #1629 from triniwiz/master
feat(): update dependencies & add property for easy configuration
2 parents a6ef5c3 + 5a764e7 commit f711304

File tree

4 files changed

+38
-9
lines changed

4 files changed

+38
-9
lines changed

test-app/app/build.gradle

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,22 +367,46 @@ dependencies {
367367
androidXLegacyVersion = androidXLegacy
368368
}
369369

370-
def androidXAppCompatVersion = "1.0.2"
370+
def androidXAppCompatVersion = "1.1.0"
371371
if (project.hasProperty("androidXAppCompat")) {
372372
androidXAppCompatVersion = androidXAppCompat
373373
}
374374

375-
def androidXMaterialVersion = "1.0.0"
375+
def androidXMaterialVersion = "1.1.0"
376376
if (project.hasProperty("androidXMaterial")) {
377377
androidXMaterialVersion = androidXMaterial
378378
}
379379

380+
def androidXExifInterfaceVersion = "1.2.0"
381+
if (project.hasProperty("androidXExifInterface")) {
382+
androidxExifInterfaceVersion = androidXExifInterface
383+
}
384+
385+
def androidXViewPagerVersion = "1.0.0"
386+
if (project.hasProperty("androidXViewPager")) {
387+
androidXViewPagerVersion = androidXViewPager
388+
}
389+
390+
def androidXFragmentVersion = "1.2.5"
391+
if (project.hasProperty("androidXFragment")) {
392+
androidXFragmentVersion = androidXFragment
393+
}
394+
395+
def androidXTransitionVersion = "1.3.1"
396+
if (project.hasProperty("androidXTransition")) {
397+
androidXTransitionVersion = androidXTransition
398+
}
399+
380400
outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.legacy:legacy-support-v4:$androidXLegacyVersion"
381401

382402
implementation "androidx.multidex:multidex:2.0.1"
383403
implementation "androidx.legacy:legacy-support-v4:$androidXLegacyVersion"
384404
implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
385405
implementation "com.google.android.material:material:$androidXMaterialVersion"
406+
implementation "androidx.exifinterface:exifinterface:$androidXExifInterfaceVersion"
407+
implementation "androidx.viewpager2:viewpager2:$androidXViewPagerVersion"
408+
implementation "androidx.fragment:fragment:$androidXFragmentVersion"
409+
implementation "androidx.transition:transition:$androidXTransitionVersion"
386410

387411
def useV8Symbols = false
388412

test-app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
}
1111
initialize()
1212

13-
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.41"
13+
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.72"
1414
}
1515
def kotlinVersion = computeKotlinVersion()
1616

@@ -19,7 +19,7 @@ buildscript {
1919
jcenter()
2020
}
2121
dependencies {
22-
classpath 'com.android.tools.build:gradle:3.6.3'
22+
classpath 'com.android.tools.build:gradle:4.0.1'
2323
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
2424
}
2525
}

test-app/runtime/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (useCCache) {
2020
println "Use CCache build triggered."
2121
}
2222

23-
project.ext._buildToolsVersion = "29.0.2"
23+
project.ext._buildToolsVersion = "30.0.1"
2424

2525
android {
2626
sourceSets {
@@ -32,12 +32,12 @@ android {
3232
java.srcDirs = [bindingGeneratorSourcePath, defaultSrcPath]
3333
}
3434
}
35-
compileSdkVersion 29
35+
compileSdkVersion 30
3636
buildToolsVersion project.ext._buildToolsVersion
3737

3838
defaultConfig {
3939
minSdkVersion 17
40-
targetSdkVersion 29
40+
targetSdkVersion 30
4141
versionCode 1
4242
versionName "1.0"
4343

test-app/runtime/src/main/java/com/tns/Runtime.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@ public void releaseNativeCounterpart(int nativeObjectId) {
367367
}
368368

369369
private static class WorkerThreadHandler extends Handler {
370+
371+
WorkerThreadHandler(Looper looper){
372+
super(looper);
373+
}
374+
370375
@Override
371376
public void handleMessage(Message msg) {
372377
Runtime currentRuntime = Runtime.getCurrentRuntime();
@@ -439,14 +444,14 @@ public WorkerThread(String name, Integer workerId, ThreadScheduler mainThreadSch
439444
}
440445

441446
public void startRuntime() {
442-
Handler handler = new Handler(this.getLooper());
447+
final Handler handler = new Handler(this.getLooper());
443448

444449
handler.post((new Runnable() {
445450
@Override
446451
public void run() {
447452
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
448453

449-
WorkThreadScheduler workThreadScheduler = new WorkThreadScheduler(new WorkerThreadHandler());
454+
WorkThreadScheduler workThreadScheduler = new WorkThreadScheduler(new WorkerThreadHandler(handler.getLooper()));
450455

451456
DynamicConfiguration dynamicConfiguration = new DynamicConfiguration(workerId, workThreadScheduler, mainThreadScheduler, callingJsDir);
452457

0 commit comments

Comments
 (0)