This commit is contained in:
kunfei 2023-03-11 08:18:47 +08:00
parent e465c979f8
commit 9b26518819
28 changed files with 70 additions and 5 deletions

View File

@ -117,9 +117,7 @@ android {
targetCompatibility JavaVersion.VERSION_11
}
packagingOptions {
resources {
excludes += ['META-INF/INDEX.LIST']
}
resources.excludes.add('META-INF/*')
}
sourceSets {
@ -203,7 +201,7 @@ dependencies {
//JS rhino
//implementation('com.github.gedoor:rhino-android:1.8')
implementation(fileTree(dir: 'lib', include: ['rhino-*.jar']))
implementation(project(path: ':rhino'))
//
implementation('com.squareup.okhttp3:okhttp:4.10.0')

Binary file not shown.

1
rhino/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

36
rhino/build.gradle Normal file
View File

@ -0,0 +1,36 @@
plugins {
id 'com.android.library'
}
android {
compileSdk = compile_sdk_version
buildToolsVersion = build_tool_version
namespace 'com.script'
defaultConfig {
minSdk 21
targetSdk 33
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lint {
checkDependencies true
}
}
dependencies {
compileOnly "com.android.tools.build:gradle:$agp_version"
api(fileTree(dir: 'lib', include: ['rhino-*.jar']))
}

0
rhino/consumer-rules.pro Normal file
View File

Binary file not shown.

26
rhino/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,26 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
## Rhino
-keep class javax.script.** { *; }
-keep class com.sun.script.javascript.** { *; }
-keep class org.mozilla.javascript.** { *; }

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>
</manifest>

View File

@ -28,4 +28,4 @@ dependencyResolutionManagement {
}
rootProject.name = 'legado'
include ':app',':epublib'
include ':app',':rhino',':epublib'