Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arm64v8a committed Dec 3, 2022
1 parent 714231a commit 3b9d5c2
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 344 deletions.
7 changes: 2 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id("kotlin-android")
id("kotlin-kapt")
id("kotlin-parcelize")
id("com.mikepenz.aboutlibraries.plugin")
}

setupApp()
Expand Down Expand Up @@ -32,8 +31,9 @@ dependencies {
compileOnly(project(":library:stub"))
implementation(project(":library:include"))

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3")
implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.recyclerview:recyclerview:1.2.1")
implementation("androidx.activity:activity-ktx:1.4.0")
implementation("androidx.fragment:fragment-ktx:1.4.1")
implementation("androidx.browser:browser:1.4.0")
Expand All @@ -57,7 +57,6 @@ dependencies {
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.3")
implementation("org.yaml:snakeyaml:1.30")
implementation("com.github.daniel-stoneuk:material-about-library:3.2.0-rc01")
implementation("com.mikepenz:aboutlibraries:8.9.4")
implementation("com.jakewharton:process-phoenix:2.1.2")
implementation("com.esotericsoftware:kryo:5.2.1")
implementation("com.google.guava:guava:31.0.1-android")
Expand All @@ -77,7 +76,5 @@ dependencies {
implementation("com.github.MatrixDev.Roomigrant:RoomigrantLib:0.3.4")
kapt("com.github.MatrixDev.Roomigrant:RoomigrantCompiler:0.3.4")

// implementation("io.grpc:grpc-okhttp:1.40.1")

coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
}

This file was deleted.

23 changes: 0 additions & 23 deletions app/src/debug/res/xml/shortcuts.xml

This file was deleted.

10 changes: 0 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@
android:label="@string/add_profile_methods_scan_qr_code"
android:launchMode="singleTask"
android:parentActivityName="io.nekohasekai.sagernet.ui.MainActivity" />
<activity
android:name="io.nekohasekai.sagernet.ui.LicenseActivity"
android:configChanges="uiMode"
android:label="@string/oss_licenses"
android:launchMode="singleTask"
android:parentActivityName="io.nekohasekai.sagernet.ui.MainActivity" />
<activity
android:name="io.nekohasekai.sagernet.ui.ProfileSelectActivity"
android:configChanges="uiMode"
Expand Down Expand Up @@ -308,10 +302,6 @@
android:authorities="${applicationId}.androidx-startup"
tools:node="remove" />

<activity
android:name="com.mikepenz.aboutlibraries.ui.LibsActivity"
tools:node="remove" />

<service
android:name="androidx.room.MultiInstanceInvalidationService"
android:process=":bg" />
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,6 @@ class AboutFragment : ToolbarFragment(R.layout.layout_about) {
)
}
.build())
.addItem(MaterialAboutActionItem.Builder()
.icon(R.drawable.ic_action_copyright)
.text(R.string.oss_licenses)
.setOnClickAction {
startActivity(Intent(context, LicenseActivity::class.java))
}
.build())
.build())
.build()

Expand Down
56 changes: 0 additions & 56 deletions app/src/main/java/io/nekohasekai/sagernet/ui/LicenseActivity.kt

This file was deleted.

16 changes: 0 additions & 16 deletions app/src/test/java/io/nekohasekai/sagernet/ExampleUnitTest.kt

This file was deleted.

This file was deleted.

34 changes: 0 additions & 34 deletions app/src/test/java/io/nekohasekai/sagernet/ktx/UUIDsKtTest.kt

This file was deleted.

29 changes: 0 additions & 29 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask

// Top-level build file where you can add configuration options common to all sub-projects/modules.
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","a", "b", "ea", "jre"
).map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-+]*") }
resolutionStrategy {
componentSelection {
all {
val rejected = regex.any {
it.matches(candidate.version)
} && regex.all {
!it.matches(
currentVersion
)
}
if (rejected) {
reject("Release candidate")
}
}
}
}
// optional parameters
checkForGradleUpdate = false
outputFormatter = "json"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
}

tasks.register<Delete>("clean") {
Expand Down
13 changes: 4 additions & 9 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ plugins {
apply(from = "../repositories.gradle.kts")

dependencies {
val androidPluginVersion = rootProject.extra["androidPluginVersion"].toString()
val kotlinVersion = rootProject.extra["kotlinVersion"].toString()
implementation("com.android.tools.build:gradle:$androidPluginVersion")
implementation("com.android.tools.build:gradle-api:$androidPluginVersion")
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation(kotlin("stdlib", kotlinVersion))
// Gradle Plugins
implementation("com.android.tools.build:gradle:7.3.1")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
//
implementation("org.tukaani:xz:1.9")
implementation("com.github.triplet.gradle:play-publisher:3.6.0")
implementation("org.kohsuke:github-api:1.131")
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.3")
implementation("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.9.1")
implementation("com.github.ben-manes:gradle-versions-plugin:0.39.0")
}
Loading

0 comments on commit 3b9d5c2

Please sign in to comment.