Skip to content

Commit 571aea0

Browse files
committed
Nekos v2.0
1 parent 08417d6 commit 571aea0

File tree

144 files changed

+5812
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+5812
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [KurozeroPB]
4+
patreon: Kurozero
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: kurozero
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: ['https://www.paypal.me/pvdbroek', 'https://donatebot.io/checkout/240059867744698368']

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the ART/Dalvik VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
out/
15+
16+
# Gradle files
17+
.gradle/
18+
build/
19+
20+
# Local configuration file (sdk path, etc)
21+
sentry.properties
22+
local.properties
23+
.env
24+
25+
# Proguard folder generated by Eclipse
26+
proguard/
27+
28+
# Log Files
29+
*.log
30+
31+
# Android Studio Navigation editor temp files
32+
.navigation/
33+
34+
# Android Studio captures folder
35+
captures/
36+
37+
# Intellij
38+
*.iml
39+
.idea
40+
.idea/workspace.xml
41+
.idea/tasks.xml
42+
.idea/gradle.xml
43+
.idea/dictionaries
44+
.idea/libraries
45+
46+
# Keystore files
47+
*.jks
48+
49+
# External native build folder generated in Android Studio 2.2 and later
50+
.externalNativeBuild
51+
52+
# Google Services (e.g. APIs or Firebase)
53+
google-services.json
54+
55+
# Freeline
56+
freeline.py
57+
freeline/
58+
freeline_project_description.json

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Pepijn van den Broek
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 5 additions & 0 deletions

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle.kts

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
plugins {
2+
id("com.android.application")
3+
kotlin("android")
4+
kotlin("kapt")
5+
}
6+
7+
object Versions {
8+
private const val versionMajor = 2
9+
private const val versionMinor = 0
10+
private const val versionPatch = 0
11+
12+
const val minSdk = 28
13+
const val targetSdk = 32
14+
15+
fun generateVersionCode(): Int = minSdk * 10000000 + versionMajor * 10000 + versionMinor * 100 + versionPatch
16+
17+
fun generateVersionName(): String = "$versionMajor.$versionMinor.$versionPatch"
18+
}
19+
20+
android {
21+
namespace = "dev.vdbroek.nekos"
22+
compileSdk = Versions.targetSdk
23+
24+
defaultConfig {
25+
applicationId = "dev.vdbroek.nekos"
26+
minSdk = Versions.minSdk
27+
targetSdk = Versions.targetSdk
28+
versionCode = Versions.generateVersionCode()
29+
versionName = Versions.generateVersionName()
30+
31+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
32+
vectorDrawables {
33+
useSupportLibrary = true
34+
}
35+
}
36+
37+
buildTypes {
38+
getByName("release") {
39+
isMinifyEnabled = true
40+
isShrinkResources = true
41+
42+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
43+
44+
isDebuggable = false
45+
isJniDebuggable = false
46+
isRenderscriptDebuggable = false
47+
isPseudoLocalesEnabled = false
48+
}
49+
50+
create("beta") {
51+
versionNameSuffix = "-BETA"
52+
applicationIdSuffix = ".beta"
53+
54+
isShrinkResources = false
55+
isMinifyEnabled = false
56+
isDebuggable = false
57+
isJniDebuggable = false
58+
isRenderscriptDebuggable = false
59+
isPseudoLocalesEnabled = false
60+
61+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
62+
}
63+
64+
getByName("debug") {
65+
versionNameSuffix = "-DEBUG"
66+
applicationIdSuffix = ".debug"
67+
68+
isShrinkResources = false
69+
isMinifyEnabled = false
70+
isDebuggable = true // Set to false whenever publishing debug app to play console otherwise the AAB/APK will show as not signed.
71+
isJniDebuggable = true
72+
isRenderscriptDebuggable = true
73+
isPseudoLocalesEnabled = false
74+
}
75+
}
76+
77+
compileOptions {
78+
sourceCompatibility = JavaVersion.VERSION_17
79+
targetCompatibility = JavaVersion.VERSION_17
80+
}
81+
82+
kotlinOptions {
83+
jvmTarget = JavaVersion.VERSION_17.toString()
84+
}
85+
86+
buildFeatures {
87+
compose = true
88+
viewBinding = true
89+
}
90+
91+
composeOptions {
92+
kotlinCompilerExtensionVersion = "1.2.0-beta02"
93+
}
94+
95+
packagingOptions {
96+
resources {
97+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
98+
}
99+
}
100+
}
101+
102+
dependencies {
103+
// Android libraries
104+
implementation("androidx.core:core-ktx:1.7.0")
105+
implementation("androidx.core:core-splashscreen:1.0.0-rc01")
106+
implementation("androidx.datastore:datastore-preferences:1.0.0")
107+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
108+
109+
// Compose libraries
110+
implementation("androidx.activity:activity-compose:1.4.0")
111+
implementation("androidx.compose.ui:ui:1.2.0-beta02")
112+
implementation("androidx.compose.ui:ui-tooling-preview:1.2.0-beta02")
113+
implementation("androidx.compose.material3:material3:1.0.0-alpha12")
114+
implementation("androidx.compose.material:material-icons-extended:1.2.0-beta02")
115+
implementation("androidx.navigation:navigation-compose:2.4.2")
116+
117+
// Google accompanist components
118+
implementation("com.google.accompanist:accompanist-flowlayout:0.24.9-beta")
119+
implementation("com.google.accompanist:accompanist-swiperefresh:0.24.9-beta")
120+
121+
// Better fling behaviour modification
122+
implementation("com.github.iamjosephmj:Flinger:1.1.1")
123+
// Until lazy staggered grid is officially supported this is the best implementation I could find
124+
// It is on the roadmap https://developer.android.com/jetpack/androidx/compose-roadmap
125+
// So surely some day it will be added to jetpack compose :)
126+
implementation("com.github.nesyou01:LazyStaggeredGrid:1.1")
127+
// Collapsing toolbar
128+
implementation("me.onebone:toolbar-compose:2.3.3")
129+
130+
// HTTP Requests
131+
implementation("com.google.code.gson:gson:2.9.0")
132+
implementation("com.github.kittinunf.fuel:fuel:2.3.1")
133+
implementation("com.github.kittinunf.fuel:fuel-android:2.3.1")
134+
implementation("com.github.kittinunf.fuel:fuel-coroutines:2.3.1")
135+
implementation("com.github.kittinunf.fuel:fuel-gson:2.3.1")
136+
implementation("com.squareup.okhttp3:okhttp:4.9.3")
137+
138+
// Loading network images
139+
implementation("com.github.bumptech.glide:glide:4.13.2")
140+
kapt("com.github.bumptech.glide:compiler:4.13.2")
141+
142+
testImplementation("junit:junit:4.13.2")
143+
androidTestImplementation("androidx.test.ext:junit:1.1.3")
144+
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
145+
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.2.0-beta02")
146+
debugImplementation("androidx.compose.ui:ui-tooling:1.2.0-beta02")
147+
debugImplementation("androidx.compose.ui:ui-test-manifest:1.2.0-beta02")
148+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package dev.vdbroek.nekos
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("dev.vdbroek.nekos", appContext.packageName)
23+
}
24+
}
278 KB
33.3 KB
45.6 KB
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
6.4 KB
3.36 KB
10.4 KB
20.2 KB
33.3 KB
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_launcher_background">#E2D7D7</color>
4+
</resources>

app/src/beta/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">Nekos Beta</string>
3+
</resources>
279 KB
33.5 KB
45.9 KB
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
6.46 KB
3.37 KB
10.5 KB
20.4 KB
33.5 KB
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_launcher_background">#E2D7D7</color>
4+
</resources>

app/src/debug/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">Nekos Debug</string>
3+
</resources>

0 commit comments

Comments
 (0)