mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-12 21:01:32 +08:00
更新rhino为1.7.14 修复对安卓8以下的支持
This commit is contained in:
parent
a589b8a98a
commit
19359ee5de
28
autojs-aar/rhino-jdk7/build.gradle
Normal file
28
autojs-aar/rhino-jdk7/build.gradle
Normal file
@ -0,0 +1,28 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk versions.compile
|
||||
|
||||
defaultConfig {
|
||||
minSdk versions.mini
|
||||
targetSdk versions.target
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api files('libs/rhino-1.7.14-jdk7.jar')
|
||||
}
|
||||
BIN
autojs-aar/rhino-jdk7/libs/rhino-1.7.14-jdk7-sources.jar
Normal file
BIN
autojs-aar/rhino-jdk7/libs/rhino-1.7.14-jdk7-sources.jar
Normal file
Binary file not shown.
BIN
autojs-aar/rhino-jdk7/libs/rhino-1.7.14-jdk7.jar
Normal file
BIN
autojs-aar/rhino-jdk7/libs/rhino-1.7.14-jdk7.jar
Normal file
Binary file not shown.
5
autojs-aar/rhino-jdk7/src/main/AndroidManifest.xml
Normal file
5
autojs-aar/rhino-jdk7/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.mozilla">
|
||||
|
||||
</manifest>
|
||||
@ -46,7 +46,8 @@ dependencies {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
api fileTree(include: ['*.jar'], dir: 'libs')
|
||||
// api fileTree(include: ['*.jar'], dir: 'libs')
|
||||
api fileTree('libs/dx.jar')
|
||||
api 'org.greenrobot:eventbus:3.3.1'
|
||||
api 'net.lingala.zip4j:zip4j:1.3.2'
|
||||
api('com.afollestad.material-dialogs:core:0.9.2.3', {
|
||||
@ -57,7 +58,7 @@ dependencies {
|
||||
// OpenCv
|
||||
api project(path: ':autojs-aar:opencv')
|
||||
// OkHttp
|
||||
api 'com.squareup.okhttp3:okhttp:3.10.0'
|
||||
api 'com.squareup.okhttp3:okhttp:3.14.9'
|
||||
// JDeferred
|
||||
api 'org.jdeferred:jdeferred-android-aar:1.2.6'
|
||||
//RootShell
|
||||
@ -72,7 +73,7 @@ dependencies {
|
||||
api project(path: ':autojs-aar:libtermexec')
|
||||
api project(path: ':autojs-aar:emulatorview')
|
||||
api project(path: ':autojs-aar:term')
|
||||
api files('libs/rhino-1.7.11.jar')
|
||||
api project(path: ':autojs-aar:rhino-jdk7')
|
||||
api project(path: ':common')
|
||||
api project(path: ':automator')
|
||||
implementation 'com.rmtheis:tess-two:9.1.0'
|
||||
|
||||
Binary file not shown.
@ -0,0 +1,39 @@
|
||||
package com.stardust.autojs.core.ui.widget;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Android O (API26) 以下的无法使用AppCompatTextView 采用TextView
|
||||
*
|
||||
* Created by TonyJiangWJ on 2022/01/18.
|
||||
*
|
||||
*/
|
||||
@SuppressLint("AppCompatCustomView")
|
||||
public class JsTextViewOld extends TextView {
|
||||
|
||||
public JsTextViewOld(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public JsTextViewOld(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public JsTextViewOld(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public String text() {
|
||||
return getText().toString();
|
||||
}
|
||||
|
||||
public void text(CharSequence text) {
|
||||
setText(text);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.stardust.autojs.core.ui.xml;
|
||||
|
||||
import android.os.Build;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.ProgressBar;
|
||||
@ -23,6 +24,7 @@ import com.stardust.autojs.core.ui.widget.JsRelativeLayout;
|
||||
import com.stardust.autojs.core.ui.widget.JsSpinner;
|
||||
import com.stardust.autojs.core.ui.widget.JsTabLayout;
|
||||
import com.stardust.autojs.core.ui.widget.JsTextView;
|
||||
import com.stardust.autojs.core.ui.widget.JsTextViewOld;
|
||||
import com.stardust.autojs.core.ui.widget.JsToolbar;
|
||||
import com.stardust.autojs.core.ui.widget.JsViewPager;
|
||||
import com.stardust.autojs.core.ui.widget.JsWebView;
|
||||
@ -58,7 +60,7 @@ public class XmlConverter {
|
||||
.map("horizontal", JsLinearLayout.class.getName())
|
||||
.map("relative", JsRelativeLayout.class.getName())
|
||||
.map("button", JsButton.class.getName())
|
||||
.map("text", JsTextView.class.getName())
|
||||
.map("text", Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ? JsTextView.class.getName() : JsTextViewOld.class.getName())
|
||||
.map("input", JsEditText.class.getName())
|
||||
.map("img", JsImageView.class.getName())
|
||||
.map("datepicker", DatePicker.class.getName())
|
||||
|
||||
@ -40,6 +40,7 @@ dependencies {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
api 'androidx.appcompat:appcompat:1.2.0'
|
||||
api "androidx.appcompat:appcompat:$appcompat_version"
|
||||
implementation("androidx.appcompat:appcompat-resources:$appcompat_version")
|
||||
api project(path: ':common')
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import groovy.json.JsonSlurper
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.10'
|
||||
ext.junit_version = '4.13.2'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
@ -42,4 +41,6 @@ task clean(type: Delete) {
|
||||
|
||||
ext {
|
||||
versions = new JsonSlurper().parse(file('./project-versions.json'))
|
||||
ext.junit_version = '4.13.2'
|
||||
ext.appcompat_version = '1.4.1'
|
||||
}
|
||||
|
||||
@ -9,3 +9,4 @@ include ':js-supports:autojs-tool-webview'
|
||||
include ':js-supports:autojs-tool-encrypt'
|
||||
include ':js-supports:autojs-tool-common'
|
||||
include ':js-supports:kill-pro-limit'
|
||||
include ':autojs-aar:rhino-jdk7'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user