6.7.0 - Alpha4 - 新增 JS 脚本工具 (run-scrapers.mjs)

This commit is contained in:
SuperMonster003
2025-09-09 17:24:48 +08:00
parent a997c7bbec
commit 9991ec3c28
56 changed files with 5167 additions and 752 deletions

View File

@@ -43,7 +43,13 @@ dependencies /* Unclassified */ {
implementation(kotlin("reflect"))
// Androidx Core
implementation("androidx.core:core-ktx:1.16.0")
implementation("androidx.core:core-ktx") {
because("Compatibility for Android Gradle plugin 8.2.2")
version {
strictly("1.15.0")
because("Exception on newer versions: Dependency 'androidx.core:core:1.16.0' requires Android Gradle plugin 8.6.0 or higher")
}
}
// LeakCanary
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.14")
@@ -74,7 +80,7 @@ dependencies /* Unclassified */ {
implementation("de.psdev.licensesdialog:licensesdialog:2.2.0")
// Apache Commons
implementation("org.apache.commons:commons-lang3:3.17.0")
implementation("org.apache.commons:commons-lang3:3.18.0")
// Retrofit
implementation("com.squareup.retrofit2:retrofit:2.12.0")
@@ -657,6 +663,7 @@ android {
}
}
@Suppress("DEPRECATION")
kotlinOptions {
jvmTarget = versions.javaVersion.toString()
// freeCompilerArgs = listOf("-Xjvm-default=all-compatibility")
@@ -857,7 +864,7 @@ class Versions(filePath: String) {
}
}
private val javaVersionMinSuggested: Int = properties["JAVA_VERSION_MIN_SUGGESTED"].let { it as String }.toInt()
private val javaVersionMinRadical: Int = properties["JAVA_VERSION_MIN_RADICAL"].let { it as String }.toInt()
private val javaVersionMaxSupported: Int = properties["JAVA_VERSION_MAX_SUPPORTED"].let { it as String }.toInt()
private val javaVersionRaw = properties["JAVA_VERSION"] as String
private var javaVersionInfoSuffix = ""
@@ -920,15 +927,15 @@ class Versions(filePath: String) {
if (currentVersionInt < javaVersionMinSuggested) {
logger.error(
"It is recommended to upgrade current Gradle JDK version ${JavaVersion.current()} to $javaVersionMinSuggested or higher${
if (javaVersionMinRadical > 0) " (but lower than $javaVersionMinRadical)" else ""
if (javaVersionMaxSupported > 0) " (but not higher than $javaVersionMaxSupported)" else ""
}."
)
}
if (javaVersionMinRadical in 1..currentVersionInt) {
if (currentVersionInt > javaVersionMaxSupported) {
logger.error(
"It is recommended to downgrade current Gradle JDK version $currentVersionInt " +
"to ${javaVersionMinRadical - 1}${if (javaVersionMinRadical - 1 > javaVersionMinSuggested) " or lower (but not lower than $javaVersionMinSuggested)" else ""}, " +
"as Gradle may be not compatible with JDK $javaVersionMinRadical${if (currentVersionInt > javaVersionMinRadical) " (and above)" else ""} for now."
"to $javaVersionMaxSupported${if (javaVersionMaxSupported > javaVersionMinSuggested) " or lower (but not lower than $javaVersionMinSuggested)" else ""}, " +
"as Gradle may be not compatible with JDK $currentVersionInt for now."
)
}
}
@@ -939,7 +946,7 @@ class Versions(filePath: String) {
val infoVerName = "Version name: $appVersionName"
val infoVerCode = "Version code: ${if (isBuildNumberAutoIncremented) "${appVersionCode + 1} [auto-incremented]" else appVersionCode}"
val infoVerSdk = "SDK versions: min [$sdkVersionMin] / target [$sdkVersionTarget] / compile [$sdkVersionCompile]"
val infoVerJava = "Java version: $javaVersion$javaVersionInfoSuffix"
val infoVerJava = "Java version: $javaVersion${if (gradle.extra.has("isHideConsoleInfoHintSuffix") && gradle.extra.get("isHideConsoleInfoHintSuffix") == true) "" else javaVersionInfoSuffix}"
val maxLength = arrayOf(title, infoVerName, infoVerCode, infoVerSdk, infoVerJava).maxOf { it.length }

View File

@@ -1,84 +0,0 @@
{
"name": "dayjs",
"version": "1.11.10",
"description": "2KB immutable date time library alternative to Moment.js with the same modern API ",
"main": "dayjs.min.js",
"types": "index.d.ts",
"scripts": {
"test": "TZ=Pacific/Auckland npm run test-tz && TZ=Europe/London npm run test-tz && TZ=America/Whitehorse npm run test-tz && npm run test-tz && jest",
"test-tz": "date && jest test/timezone.test --coverage=false",
"lint": "./node_modules/.bin/eslint src/* test/* build/*",
"prettier": "prettier --write \"docs/**/*.md\"",
"babel": "cross-env BABEL_ENV=build babel src --out-dir esm --copy-files && node build/esm",
"build": "cross-env BABEL_ENV=build node build && npm run size",
"sauce": "npx karma start karma.sauce.conf.js",
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2 && npm run sauce -- 3",
"size": "size-limit && gzip-size dayjs.min.js"
},
"pre-commit": [
"lint"
],
"size-limit": [
{
"limit": "2.99 KB",
"path": "dayjs.min.js"
}
],
"jest": {
"roots": [
"test"
],
"testRegex": "test/(.*?/)?.*test.js$",
"testURL": "http://localhost",
"coverageDirectory": "./coverage/",
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*"
]
},
"keywords": [
"dayjs",
"date",
"time",
"immutable",
"moment"
],
"author": "iamkun",
"license": "MIT",
"homepage": "https://day.js.org",
"repository": {
"type": "git",
"url": "https://github.com/iamkun/dayjs.git"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.44",
"@babel/core": "^7.0.0-beta.44",
"@babel/node": "^7.0.0-beta.44",
"@babel/preset-env": "^7.0.0-beta.44",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^22.4.3",
"babel-plugin-external-helpers": "^6.22.0",
"cross-env": "^5.1.6",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jest": "^21.15.0",
"gzip-size-cli": "^2.1.0",
"jasmine-core": "^2.99.1",
"jest": "^22.4.3",
"karma": "^2.0.2",
"karma-jasmine": "^1.1.2",
"karma-sauce-launcher": "^1.1.0",
"mockdate": "^2.0.2",
"moment": "2.29.2",
"moment-timezone": "0.5.31",
"ncp": "^2.0.0",
"pre-commit": "^1.2.2",
"prettier": "^1.16.1",
"rollup": "^2.45.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^7.0.2",
"size-limit": "^0.18.0",
"typescript": "^2.8.3"
}
}