瀏覽代碼

Update dependencies

世界 4 年之前
父節點
當前提交
37c38096c9

+ 5 - 0
.idea/jarRepositories.xml

@@ -36,5 +36,10 @@
       <option name="name" value="maven" />
       <option name="url" value="https://dl.bintray.com/takisoft/android" />
     </remote-repository>
+    <remote-repository>
+      <option name="id" value="Gradle Central Plugin Repository2" />
+      <option name="name" value="Gradle Central Plugin Repository2" />
+      <option name="url" value="https://plugins.gradle.org/m2" />
+    </remote-repository>
   </component>
 </project>

+ 0 - 1
app/src/main/res/values-zh-rCN/strings.xml

@@ -308,7 +308,6 @@
     <string name="list">列表</string>
     <string name="random">随机</string>
     <string name="api_port">API 端口</string>
-    <string name="experimental_api">使用实验性的 API</string>
     <string name="probe_interval">负载均衡观测间隔</string>
     <string name="standard">标准</string>
     <string name="unavailable">不可用</string>

+ 0 - 1
app/src/main/res/values/strings.xml

@@ -348,7 +348,6 @@
     <string name="leastPing" translatable="false">Ping</string>
 
     <string name="api_port">API Port</string>
-    <string name="experimental_api">Use Experimental API</string>
     <string name="probe_interval">Balancer observation interval</string>
 
     <string name="standard">Standard</string>

+ 23 - 33
build.gradle.kts

@@ -1,45 +1,23 @@
 import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
 
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-plugins {
-    id("com.github.ben-manes.versions") version "0.39.0" apply false
-    id("com.google.protobuf") version "0.8.17" apply false
-}
-
-buildscript {
-    apply(from = "repositories.gradle.kts")
-
-    repositories {
-        google()
-        mavenCentral()
-        gradlePluginPortal()
-    }
-
-    dependencies {
-        val androidPluginVersion = rootProject.extra["androidPluginVersion"].toString()
-        val kotlinVersion = rootProject.extra["kotlinVersion"].toString()
-        val playPublisherVersion = rootProject.extra["playPublisherVersion"].toString()
-
-        classpath("com.android.tools.build:gradle:$androidPluginVersion")
-        classpath(kotlin("gradle-plugin", kotlinVersion))
-        classpath("org.mozilla.rust-android-gradle:plugin:0.8.7")
-        classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.9.1")
-        classpath("com.github.triplet.gradle:play-publisher:$playPublisherVersion")
-    }
-}
-
 allprojects {
     apply(from = "${rootProject.projectDir}/repositories.gradle.kts")
     apply(plugin = "com.github.ben-manes.versions")
     tasks.named<DependencyUpdatesTask>("dependencyUpdates") {
+        val regex = listOf(
+            "alpha", "beta", "rc", "cr", "m", "preview", "b", "ea"
+        ).map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-+]*") }
         resolutionStrategy {
             componentSelection {
                 all {
-
-                    val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview", "b", "ea")
-                        .map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-+]*") }
-                        .any { it.matches(candidate.version) }
+                    val rejected = regex.any {
+                        it.matches(candidate.version)
+                    } && regex.all {
+                        !it.matches(
+                            currentVersion
+                        )
+                    }
                     if (rejected) {
                         reject("Release candidate")
                     }
@@ -47,7 +25,7 @@ allprojects {
             }
         }
         // optional parameters
-        checkForGradleUpdate = true
+        checkForGradleUpdate = false
         outputFormatter = "json"
         outputDir = "build/dependencyUpdates"
         reportfileName = "report"
@@ -64,3 +42,15 @@ subprojects {
         if (name.contains("uploadCrashlyticsMappingFile")) enabled = false
     }
 }
+
+tasks.named<Wrapper>("wrapper") {
+    distributionType = Wrapper.DistributionType.ALL
+
+    doLast {
+        val sha256 = java.net.URL("$distributionUrl.sha256")
+            .openStream()
+            .use { it.reader().readText().trim() }
+
+        file("gradle/wrapper/gradle-wrapper.properties").appendText("distributionSha256Sum=$sha256")
+    }
+}

+ 6 - 0
buildSrc/build.gradle.kts

@@ -1,4 +1,6 @@
 plugins {
+    kotlin("jvm") version "1.5.10"
+    `java-gradle-plugin`
     `kotlin-dsl`
 }
 
@@ -16,4 +18,8 @@ dependencies {
     implementation("com.github.triplet.gradle:play-publisher:$playPublisherVersion")
     implementation("org.kohsuke:github-api:1.131")
     implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")
+    implementation("org.mozilla.rust-android-gradle:plugin:0.8.7")
+    implementation("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.9.1")
+    implementation("com.google.protobuf:protobuf-gradle-plugin:0.8.17")
+    implementation("com.github.ben-manes:gradle-versions-plugin:0.39.0")
 }

+ 1 - 1
external/editorkit

@@ -1 +1 @@
-Subproject commit 7b2b19c63880bf59557e0d0c27de4c8c62385e91
+Subproject commit f1a76c55aa420c692640684b81420f5672d446ff

+ 1 - 1
external/preferencex

@@ -1 +1 @@
-Subproject commit 34e46ffbe337bc6929237d2b699f0401fc2558a9
+Subproject commit 2e47ff98fe5bff8ce7cc5dfe5204cc2a61847764

+ 2 - 1
repositories.gradle.kts

@@ -7,5 +7,6 @@ rootProject.extra.apply {
 repositories {
     google()
     mavenCentral()
+    gradlePluginPortal()
     maven(url = "https://jitpack.io")
-}
+}

+ 2 - 2
sager.properties

@@ -1,6 +1,6 @@
 PACKAGE_NAME=io.nekohasekai.sagernet
-VERSION_NAME=0.3-beta06
-VERSION_CODE=66
+VERSION_NAME=0.3-rc01
+VERSION_CODE=67
 
 NAIVE_VERSION_NAME=92.0.4515.107-1
 NAIVE_VERSION=3