Skip to content

Commit f5d4574

Browse files
committed
update
1 parent bd9eb2a commit f5d4574

File tree

12 files changed

+93
-54
lines changed

12 files changed

+93
-54
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ captures/
5050
/projectFilesBackup/.idea
5151
/gradlew
5252
/local.properties
53+
/gradle-build/

.idea/codeStyles/Project.xml

Lines changed: 16 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/announce.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
22
"backUp": [
33
"https://www.seedmm.life",
4-
"https://www.javbus.icu",
54
"https://www.busjav.icu",
65
"https://www.javbus.com",
76
"https://www.dmmsee.one",
87
"https://www.buscdn.one",
8+
"https://www.busfan.cam",
9+
"https://www.busfan.co",
10+
"https://www.fanbus.life",
911
"https://www.dmmbus.zone"
1012
],
11-
"xyz": "https://www.avbus.one",
13+
"xyz": "https://www.javbus.one",
1214
"xyzLoader": {
13-
"url": "https://www.avbus.one",
15+
"url": "https://www.javbus.one",
1416
"legacyHost": [
1517
"work",
1618
"zone",

app/src/main/java/me/jbusdriver/http/JAVBusService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ interface JAVBusService {
2020

2121

2222
companion object {
23-
var defaultFastUrl = "https://www.seedmm.zone"
24-
var defaultXyzUrl = "https://www.avbus.one"
23+
var defaultFastUrl = "https://www.seedmm.life"
24+
var defaultXyzUrl = "https://www.javbus.one"
2525
val xyzHostDomains by lazy {
2626
mutableSetOf<String>().apply {
2727
this.add(defaultXyzUrl.takeLast(defaultXyzUrl.lastIndexOf(".").coerceAtLeast(0)))

app/src/main/java/me/jbusdriver/ui/activity/SplashActivity.kt

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,22 @@ class SplashActivity : BaseActivity() {
7272
GSON.fromJson<ArrayMap<String, String>>(it)
7373
}
7474
val urlsFromUpdateCache =
75-
Flowable.concat(CacheLoader.justLru(C.Cache.ANNOUNCE_URL), GitHub.INSTANCE.announce())
75+
Flowable.concat(
76+
CacheLoader.justLru(C.Cache.ANNOUNCE_URL),
77+
GitHub.INSTANCE.announce()
78+
)
7679
.firstOrError().toFlowable()
7780
.map { source ->
7881
//放入内存缓存,更新需要
7982
val r = GSON.fromJson<JsonObject>(source) ?: JsonObject()
8083
CacheLoader.cacheLru(C.Cache.ANNOUNCE_VALUE to r)
8184
arrayMapof<String, String>().apply {
8285
val xyzLoader = r.getAsJsonObject("xyzLoader") ?: JsonObject()
83-
JAVBusService.defaultXyzUrl = xyzLoader.get("url")?.asString?.removeSuffix("/").orEmpty()
84-
JAVBusService.xyzHostDomains.addAll(xyzLoader.getAsJsonArray("legacyHost")?.map { it.asString }
85-
?: emptyList())
86+
JAVBusService.defaultXyzUrl =
87+
xyzLoader.get("url")?.asString?.removeSuffix("/").orEmpty()
88+
JAVBusService.xyzHostDomains.addAll(
89+
xyzLoader.getAsJsonArray("legacyHost")?.map { it.asString }
90+
?: emptyList())
8691
val availableUrls = r.get("backUp")?.asJsonArray
8792
//赋值一个默认的(随机)
8893
availableUrls?.let {
@@ -98,8 +103,7 @@ class SplashActivity : BaseActivity() {
98103
.flatMap {
99104
urls = it
100105
val mapFlow = GSON.fromJson<List<String>>(
101-
it[DataSourceType.CENSORED.key]
102-
?: ""
106+
it[DataSourceType.CENSORED.key].orEmpty()
103107
).map {
104108
Flowable.combineLatest(Flowable.just<String>(it),
105109
JAVBusService.INSTANCE.get(it).addUserCase(15).onErrorReturnItem(""),
@@ -110,7 +114,8 @@ class SplashActivity : BaseActivity() {
110114
.firstOrError()
111115
.doOnError { CacheLoader.acache.remove(C.Cache.ANNOUNCE_URL) }
112116
.map {
113-
val ds = DataSourceType.values().takeLast(DataSourceType.values().size - 1).toMutableList()
117+
val ds = DataSourceType.values().takeLast(DataSourceType.values().size - 1)
118+
.toMutableList()
114119
Jsoup.parse(it.second).select(".navbar-nav a").forEach { box ->
115120
ds.find { box.text() == it.key }?.let {
116121
ds.remove(it)
@@ -121,7 +126,7 @@ class SplashActivity : BaseActivity() {
121126
urls[DataSourceType.XYZ.key]?.let {
122127
//欧美
123128
urls[DataSourceType.XYZ_ACTRESSES.key] =
124-
"$it/${DataSourceType.XYZ_ACTRESSES.key.split("/").last()}"
129+
"$it/${DataSourceType.XYZ_ACTRESSES.key.split("/").last()}"
125130
urls.put(
126131
DataSourceType.XYZ_GENRE.key,
127132
"$it/${DataSourceType.XYZ_GENRE.key.split("/").last()}"
@@ -132,20 +137,30 @@ class SplashActivity : BaseActivity() {
132137
//change xyz
133138
if (JAVBusService.defaultXyzUrl.isNotBlank()) {
134139
urls[DataSourceType.XYZ.key] = JAVBusService.defaultXyzUrl
135-
urls[DataSourceType.XYZ_ACTRESSES.key] = "${JAVBusService.defaultXyzUrl}/actresses"
136-
urls[DataSourceType.XYZ_GENRE.key] = "${JAVBusService.defaultXyzUrl}/genre"
140+
urls[DataSourceType.XYZ_ACTRESSES.key] =
141+
"${JAVBusService.defaultXyzUrl}/actresses"
142+
urls[DataSourceType.XYZ_GENRE.key] =
143+
"${JAVBusService.defaultXyzUrl}/genre"
137144
} else {
138145
val host = JAVBusService.xyzHostDomains.firstOrNull() ?: "work"
139-
val baseUrlSuffix = urls[DataSourceType.XYZ.key]?.substringAfterLast(".").orEmpty()
140-
urls[DataSourceType.XYZ.key] = urls[DataSourceType.XYZ.key]?.replace(baseUrlSuffix, host)
146+
val baseUrlSuffix =
147+
urls[DataSourceType.XYZ.key]?.substringAfterLast(".").orEmpty()
148+
urls[DataSourceType.XYZ.key] =
149+
urls[DataSourceType.XYZ.key]?.replace(baseUrlSuffix, host)
141150
urls[DataSourceType.XYZ_ACTRESSES.key] =
142-
urls[DataSourceType.XYZ_ACTRESSES.key]?.replace(baseUrlSuffix, host)
151+
urls[DataSourceType.XYZ_ACTRESSES.key]?.replace(baseUrlSuffix, host)
143152
urls[DataSourceType.XYZ_GENRE.key] =
144-
urls[DataSourceType.XYZ_GENRE.key]?.replace(baseUrlSuffix, host)
153+
urls[DataSourceType.XYZ_GENRE.key]?.replace(baseUrlSuffix, host)
145154
}
146155

147-
CacheLoader.cacheLruAndDisk(C.Cache.BUS_URLS to urls, C.Cache.DAY * 2) //缓存所有的urls
148-
CacheLoader.lru.put(DataSourceType.CENSORED.key + "false", it.second) //默认有种的
156+
CacheLoader.cacheLruAndDisk(
157+
C.Cache.BUS_URLS to urls,
158+
C.Cache.DAY * 2
159+
) //缓存所有的urls
160+
CacheLoader.lru.put(
161+
DataSourceType.CENSORED.key + "false",
162+
it.second
163+
) //默认有种的
149164
KLog.d("init urls second :$urls ")
150165
urls
151166
}.toFlowable()

build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ buildscript {
66
maven { url 'https://maven.aliyun.com/repository/public' }
77
maven { url 'https://maven.aliyun.com/repository/google' }
88
maven { url "https://jitpack.io" }
9+
maven { url 'https://dl.bintray.com/umsdk/release' }
910
google()
1011
}
1112
dependencies {
@@ -31,8 +32,28 @@ allprojects {
3132
maven { url "https://jitpack.io" }
3233
maven { url 'https://dl.bintray.com/umsdk/release' }
3334
}
35+
36+
apply plugin: 'idea'
37+
buildDir = new File(rootDir, "gradle-build/${path.replaceAll(':', '/')}")
38+
println(" $it -> ${path.replaceAll(':', '/')} ,$buildDir")
39+
40+
it.afterEvaluate {
41+
try {
42+
it.android {
43+
compileOptions {
44+
sourceCompatibility 1.8
45+
targetCompatibility 1.8
46+
}
47+
// kotlinOptions {
48+
// jvmTarget = "1.8"
49+
// }
50+
}
51+
} catch (Exception e) {
52+
}
53+
}
3454
}
3555

56+
3657
/**
3758
* maven { url 'https://mirrors.huaweicloud.com/repository/maven/' }* jcenter()
3859
* google()

buildscripts/cc-settings-2-app.gradle

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,7 @@ apply from: rootProject.file('buildscripts/cc-settings-2.gradle')
1818
// project.apply plugin: 'kotlin-android-extensions'
1919
// project.apply plugin: 'kotlin-kapt'//kapt3插件
2020
//}
21-
/**
22-
* compileOptions {
23-
* sourceCompatibility 1.8
24-
* targetCompatibility 1.8
25-
* }
26-
*/
2721

28-
android.compileOptions{
29-
sourceCompatibility 1.8
30-
targetCompatibility 1.8
31-
}
3222

3323
dependencies {
3424
implementation project(':libraries:library_base')

buildscripts/plugin-common.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ if (project.ext.has('runAsApp') && project.ext.runAsApp) {
2020
println("$project ----> set app as client plugin")
2121
apply plugin: 'com.wlqq.phantom.plugin'
2222

23-
android.compileOptions{
24-
sourceCompatibility 1.8
25-
targetCompatibility 1.8
26-
}
2723

2824
project.dependencies.add("compileOnly", "com.wlqq.phantom:phantom-communication-lib:${versions.phantom.allVersion}")
2925
project.dependencies.add("compileOnly", "com.wlqq.phantom:phantom-plugin-lib:${versions.phantom.allVersion}")

component_plugin_manager/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ android {
2525
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2626
}
2727
}
28-
28+
compileOptions {
29+
sourceCompatibility 1.8
30+
targetCompatibility 1.8
31+
}
32+
kotlinOptions {
33+
jvmTarget = "1.8"
34+
}
2935
}
3036

3137
dependencies {

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

0 commit comments

Comments
 (0)