Skip to content

Commit

Permalink
Merge pull request #652 from aiselp/build-t
Browse files Browse the repository at this point in the history
构建配置优化
  • Loading branch information
kkevsekk1 authored Sep 3, 2023
2 parents 14302f2 + a6d4821 commit a498821
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 46 deletions.
2 changes: 0 additions & 2 deletions apkbuilder/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ plugins {
}

android {
buildToolsVersion = versions.buildTool
compileSdk = versions.compile

defaultConfig {
minSdk = versions.mini
targetSdk = versions.target
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
12 changes: 4 additions & 8 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import java.util.Properties
plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-android-extensions")
id("com.jakewharton.butterknife")
id("kotlin-kapt")
}
Expand All @@ -26,9 +25,7 @@ if (propFile.exists()) {
// }
//}
android {
buildToolsVersion = versions.buildTool
compileSdk = versions.compile

defaultConfig {
applicationId = "org.autojs.autoxjs"
minSdk = versions.mini
Expand Down Expand Up @@ -60,8 +57,7 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}
composeOptions {
kotlinCompilerExtensionVersion = "1.2.0-rc01"
kotlinCompilerVersion = "1.6.20"
kotlinCompilerExtensionVersion = compose_version
}
signingConfigs {
if (propFile.exists()) {
Expand Down Expand Up @@ -188,7 +184,7 @@ dependencies {
implementation("androidx.compose.material:material:$compose_version")
implementation("androidx.compose.ui:ui-tooling-preview:$compose_version")
implementation("androidx.activity:activity-compose:1.3.1")
implementation("org.chromium.net:cronet-embedded:76.3809.111")
// implementation("org.chromium.net:cronet-embedded:76.3809.111")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$compose_version")
debugImplementation("androidx.compose.ui:ui-tooling:$compose_version")

Expand All @@ -197,7 +193,7 @@ dependencies {
exclude(group = "com.android.support", module = "support-annotations")
}
testImplementation("junit:junit:4.13.2")
// Kotlin
// Kotlin携程
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2")
// Android Annotations
annotationProcessor("org.androidannotations:androidannotations:$AAVersion")
Expand Down Expand Up @@ -288,7 +284,7 @@ dependencies {
implementation(project(":apkbuilder"))
implementation("androidx.multidex:multidex:2.0.1")

val lifecycle_version = "2.5.0-rc01"
val lifecycle_version = "2.5.1"
// ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
// ViewModel utilities for Compose
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/autojs/autojs/ui/widget/EWebView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import com.stardust.autojs.script.StringScriptSource
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import org.autojs.autojs.Pref
import org.autojs.autoxjs.R
import org.autojs.autojs.model.script.Scripts
import org.autojs.autojs.tool.ImageSelector
import org.autojs.autoxjs.R
import java.io.File
import java.io.IOException
import java.io.InputStream
Expand Down Expand Up @@ -183,7 +183,7 @@ open class EWebView : FrameLayout, SwipeRefreshLayout.OnRefreshListener,
setNeedInitialFocus(true);
saveFormData = true;
cacheMode = android.webkit.WebSettings.LOAD_CACHE_ELSE_NETWORK //使用缓存
setAppCacheEnabled(false);
// setAppCacheEnabled(false);
domStorageEnabled = true
databaseEnabled = true //开启 database storage API 功能
pluginState = android.webkit.WebSettings.PluginState.ON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class SwipeRefreshWebView : ThemeColorSwipeRefreshLayout {
setNeedInitialFocus(true);
saveFormData = true;
cacheMode = WebSettings.LOAD_CACHE_ELSE_NETWORK //使用缓存
setAppCacheEnabled(false);
// setAppCacheEnabled(false);
domStorageEnabled = true
databaseEnabled = true //开启 database storage API 功能
pluginState = WebSettings.PluginState.ON
Expand Down
9 changes: 1 addition & 8 deletions autojs/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-android-extensions")
}

android {
buildToolsVersion = versions.buildTool
compileSdk = versions.compile

defaultConfig {
minSdk = versions.mini
targetSdk = versions.target
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -22,11 +19,7 @@ android {
}


compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
lintOptions.isAbortOnError = false
lint.abortOnError = false
sourceSets {
named("main") {
// jniLibs.srcDirs = listOf("src/main/jniLibs")
Expand Down
5 changes: 1 addition & 4 deletions automator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-android-extensions")
}

android {
buildToolsVersion = versions.buildTool
compileSdk = versions.compile

defaultConfig {
minSdk = versions.mini
targetSdk = versions.target
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
lintOptions.isAbortOnError = false
lint.abortOnError = false
buildTypes {
named("release") {
isMinifyEnabled = false
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ buildscript {
maven("https://maven.aliyun.com/repository/central")
google { url = uri("https://maven.aliyun.com/repository/google") }
mavenCentral { url = uri("https://maven.aliyun.com/repository/public") }
// maven { url = uri("https://jitpack.io") }
}
dependencies {
classpath("com.android.tools.build:gradle:8.0.2")
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Version.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ data class Versions(
@SerializedName("appVersionName")
val appVersionName: String = "6.3.4",
@SerializedName("buildTool")
val buildTool: String = "32.0.0",
val buildTool: String = "33.0.0",
@SerializedName("compile")
val compile: Int = 0,
val compile: Int = 33,
@SerializedName("devVersionCode")
val devVersionCode: Int = 634,
@SerializedName("devVersionName")
Expand Down
1 change: 0 additions & 1 deletion ci_test.txt

This file was deleted.

3 changes: 0 additions & 3 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-android-extensions")
}

android {

buildToolsVersion = versions.buildTool
compileSdk = versions.compile

defaultConfig {
Expand Down
7 changes: 7 additions & 0 deletions dependencies.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
library("okhttp", "com.squareup.okhttp3:okhttp:4.10.0")
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ org.gradle.caching=true

android.useAndroidX=true
android.enableJetifier=true
android.useDeprecatedNdk=true
#android.useDeprecatedNdk=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
8 changes: 1 addition & 7 deletions inrt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import kotlin.collections.*
plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-android-extensions")
}

val propFile: File = File("E:/资料/jks/autojs-inrt/sign.properties");
Expand All @@ -16,7 +15,6 @@ if (propFile.exists()) {
}

android {
buildToolsVersion = versions.buildTool
compileSdk = versions.compile
defaultConfig {
applicationId = "org.autojs.autoxjs.inrt"
Expand All @@ -40,11 +38,7 @@ android {
add("MissingTranslation")
add("ExtraTranslation")
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
encoding = "utf-8"
}

signingConfigs {
if (propFile.exists()) {
getByName("release") {
Expand Down
8 changes: 5 additions & 3 deletions paddleocr/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ plugins {
}

android {
buildToolsVersion = versions.buildTool
compileSdk = versions.compile

defaultConfig {
minSdk = versions.mini
targetSdk = versions.target
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildTypes {
named("release") {
isMinifyEnabled = false
Expand All @@ -28,7 +30,7 @@ android {
}

dependencies {
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation(libs.okhttp)
implementation("androidx.core:core-ktx:1.8.0")
}
dependencies {
Expand Down
6 changes: 3 additions & 3 deletions project-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"devVersionName": "6.4.3",
"target": 26,
"mini": 21,
"compile": 32,
"buildTool": "32.0.0",
"compile": 33,
"buildTool": "33.0.0",
"IDE": "Android Studio Bumblebee | 2021.1.1",
"JDK": "15"
"JDK": "17"
}
3 changes: 3 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
apply {
from(file("dependencies.gradle.kts"))
}
include ':app', ':automator', ':common', ':autojs', ':inrt', ':apkbuilder'
include ':LocalRepo:libtermexec'
include ':LocalRepo:emulatorview'
Expand Down

0 comments on commit a498821

Please sign in to comment.