Skip to content
This repository was archived by the owner on Sep 27, 2025. It is now read-only.

Commit b447e6a

Browse files
committed
Add someshushs
1 parent ccb68ca commit b447e6a

26 files changed

Lines changed: 51256 additions & 90 deletions

.gitignore

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Build directories
2+
/build/
3+
/out/
4+
**/cmake-build-*/
5+
6+
# Android build
7+
**/local.properties
8+
**/.gradle/
9+
**/build/
10+
**/captures/
11+
.externalNativeBuild/
12+
.cxx/
13+
*.apk
14+
*.aab
15+
*.ap_
16+
*.dex
17+
18+
# IDE files
19+
.idea/
20+
.vscode/
21+
*.swp
22+
*.swo
23+
.project
24+
.classpath
25+
.settings/
26+
*.sublime-workspace
27+
*.sublime-project
28+
.vs/
29+
*.user
30+
*.suo
31+
*.userprefs
32+
*.usertasks
33+
*.sdf
34+
*.opensdf
35+
36+
# C++ generated files
37+
*.o
38+
*.obj
39+
*.exe
40+
*.dll
41+
*.so
42+
*.dylib
43+
*.lib
44+
*.a
45+
*.out
46+
*.app
47+
*.gch
48+
*.pch
49+
50+
# CMake generated files
51+
CMakeCache.txt
52+
CMakeFiles/
53+
cmake_install.cmake
54+
install_manifest.txt
55+
compile_commands.json
56+
CTestTestfile.cmake
57+
_deps/
58+
59+
# vcpkg
60+
/vcpkg_installed/
61+
.vcpkg/
62+
63+
# Logs and databases
64+
*.log
65+
*.sqlite
66+
*.db
67+
68+
# OS generated files
69+
.DS_Store
70+
.DS_Store?
71+
._*
72+
.Spotlight-V100
73+
.Trashes
74+
ehthumbs.db
75+
Thumbs.db
76+
77+
# Keys and credentials
78+
*.keystore
79+
*.jks
80+
*.key
81+
*.p12
82+
*.pem
83+
*.der
84+
keys/
85+
credentials/
86+
87+
# Debug files
88+
*.pdb
89+
*.ilk
90+
*.exp
91+
*.idb
92+
*.map
93+
94+
# Project specific
95+
/rootd/cache/
96+
/droid-chan/app/release/
97+
**/tmp/
98+
**/temp/
99+
100+
# Documentation generated
101+
/docs/_build/
102+
/docs/_static/
103+
/docs/_templates/

Android.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
ROOTD_PATH := ./rootd
4+
5+
include $(CLEAR_VARS)
6+
LOCAL_MODULE := rootd
7+
LOCAL_SRC_FILES := rootd.cc
8+
include $(BUILD_SHARED_LIBRARY)

droid-chan/app/build.gradle

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
plugins {
2+
id 'com.android.application'
3+
}
4+
5+
android {
6+
namespace 'me.openroot'
7+
compileSdk 34
8+
9+
defaultConfig {
10+
applicationId "me.openroot"
11+
minSdk 21
12+
targetSdk 34
13+
versionCode 1
14+
versionName "1.0"
15+
16+
ndk {
17+
abiFilters 'arm64-v8a'
18+
}
19+
}
20+
21+
buildTypes {
22+
release {
23+
minifyEnabled true
24+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25+
}
26+
}
27+
28+
sourceSets {
29+
main {
30+
// Rootd library location
31+
jniLibs.srcDirs = ['libs']
32+
}
33+
}
34+
35+
compileOptions {
36+
sourceCompatibility JavaVersion.VERSION_1_8
37+
targetCompatibility JavaVersion.VERSION_1_8
38+
}
39+
40+
buildFeatures {
41+
viewBinding true
42+
}
43+
44+
ndkVersion "26.2.11394342"
45+
46+
// Explicitly set CMake version
47+
externalNativeBuild {
48+
cmake {
49+
path "src/main/cpp/CMakeLists.txt"
50+
version "3.22.1"
51+
}
52+
}
53+
}
54+
55+
dependencies {
56+
implementation 'androidx.appcompat:appcompat:1.6.1'
57+
implementation 'com.google.android.material:material:1.9.0'
58+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
59+
implementation 'com.google.code.gson:gson:2.10.1'
60+
}

droid-chan/app/build.gradle.kts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
plugins {
2+
id("com.android.application")
3+
id("org.jetbrains.kotlin.android")
4+
}
5+
6+
android {
7+
namespace = "com.openroot.droidchan"
8+
compileSdk = 34
9+
10+
defaultConfig {
11+
applicationId = "com.openroot.droidchan"
12+
minSdk = 24
13+
targetSdk = 34
14+
versionCode = 1
15+
versionName = "1.0"
16+
17+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18+
vectorDrawables {
19+
useSupportLibrary = true
20+
}
21+
}
22+
23+
buildTypes {
24+
release {
25+
isMinifyEnabled = false
26+
proguardFiles(
27+
getDefaultProguardFile("proguard-android-optimize.txt"),
28+
"proguard-rules.pro"
29+
)
30+
}
31+
}
32+
compileOptions {
33+
sourceCompatibility = JavaVersion.VERSION_17
34+
targetCompatibility = JavaVersion.VERSION_17
35+
}
36+
kotlinOptions {
37+
jvmTarget = "17"
38+
}
39+
buildFeatures {
40+
compose = true
41+
}
42+
composeOptions {
43+
kotlinCompilerExtensionVersion = "1.5.3"
44+
}
45+
packaging {
46+
resources {
47+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
48+
}
49+
}
50+
}
51+
52+
dependencies {
53+
implementation("androidx.core:core-ktx:1.12.0")
54+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
55+
implementation("androidx.activity:activity-compose:1.8.0")
56+
implementation(platform("androidx.compose:compose-bom:2023.09.00"))
57+
implementation("androidx.compose.ui:ui")
58+
implementation("androidx.compose.ui:ui-graphics")
59+
implementation("androidx.compose.ui:ui-tooling-preview")
60+
implementation("androidx.compose.material3:material3")
61+
implementation("com.squareup.retrofit2:retrofit:2.9.0")
62+
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
63+
implementation("com.squareup.okhttp3:okhttp:4.11.0")
64+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
65+
implementation("io.ktor:ktor-server-netty:2.3.4")
66+
implementation("io.ktor:ktor-server-html-builder:2.3.4")
67+
68+
testImplementation("junit:junit:4.13.2")
69+
androidTestImplementation("androidx.test.ext:junit:1.1.5")
70+
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
71+
androidTestImplementation(platform("androidx.compose:compose-bom:2023.09.00"))
72+
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
73+
debugImplementation("androidx.compose.ui:ui-tooling")
74+
debugImplementation("androidx.compose.ui:ui-test-manifest")
75+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<application
4+
android:allowBackup="true"
5+
android:icon="@mipmap/ic_launcher"
6+
android:label="@string/app_name"
7+
android:roundIcon="@mipmap/ic_launcher_round"
8+
android:supportsRtl="true"
9+
android:theme="@style/Theme.DroidChan">
10+
<activity
11+
android:name=".MainActivity"
12+
android:exported="true"
13+
android:theme="@style/Theme.DroidChan">
14+
<intent-filter>
15+
<action android:name="android.intent.action.MAIN" />
16+
<category android:name="android.intent.category.LAUNCHER" />
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
</manifest>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cmake_minimum_required(VERSION 3.22.1)
2+
project(rootd)
3+
4+
# Set C++ standard
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
8+
# Include directories
9+
include_directories(${CMAKE_SOURCE_DIR}/../../../../include)
10+
11+
# Add rootd library
12+
add_library(rootd SHARED
13+
${CMAKE_SOURCE_DIR}/../../../../rootd/rootd.cc
14+
)
15+
16+
# Find and link against log library (for Android logging)
17+
find_library(log-lib log)
18+
target_link_libraries(rootd ${log-lib})
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.openroot.droidchan
2+
3+
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
5+
import androidx.activity.compose.setContent
6+
import androidx.compose.foundation.layout.fillMaxSize
7+
import androidx.compose.material3.MaterialTheme
8+
import androidx.compose.material3.Surface
9+
import androidx.compose.material3.Text
10+
import androidx.compose.runtime.Composable
11+
import androidx.compose.ui.Modifier
12+
import androidx.compose.ui.tooling.preview.Preview
13+
14+
class MainActivity : ComponentActivity() {
15+
override fun onCreate(savedInstanceState: Bundle?) {
16+
super.onCreate(savedInstanceState)
17+
setContent {
18+
MaterialTheme {
19+
Surface(
20+
modifier = Modifier.fillMaxSize(),
21+
color = MaterialTheme.colorScheme.background
22+
) {
23+
MainScreen()
24+
}
25+
}
26+
}
27+
}
28+
}
29+
30+
@Composable
31+
fun MainScreen() {
32+
Text(text = "Welcome to Droid-Chan!")
33+
}
34+
35+
@Preview(showBackground = true)
36+
@Composable
37+
fun DefaultPreview() {
38+
MaterialTheme {
39+
MainScreen()
40+
}
41+
}
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+
<string name="app_name">Droid-Chan</string>
4+
</resources>
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+
<style name="Theme.DroidChan" parent="android:Theme.Material.Light.NoActionBar" />
4+
</resources>

droid-chan/build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
buildscript {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
}
6+
dependencies {
7+
classpath 'com.android.tools.build:gradle:8.1.2'
8+
}
9+
}
10+
11+
allprojects {
12+
repositories {
13+
google()
14+
mavenCentral()
15+
}
16+
}

0 commit comments

Comments
 (0)