Skip to content

Commit 83fc6fb

Browse files
Fixed desktop crash,
Renamed "app" module to "androidApp", Renamed "desktop" module to "desktopApp"
1 parent 874b43b commit 83fc6fb

File tree

621 files changed

+1213
-98
lines changed

Some content is hidden

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

621 files changed

+1213
-98
lines changed

.github/workflows/publish_alpha.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464

6565
- name: Set variables
6666
run: |
67-
VER=$(grep -E -o "versionName \".*\"" app/build.gradle | sed -e 's/versionName //g' | tr -d '"')
67+
VER=$(grep -E -o "versionName \".*\"" androidApp/build.gradle | sed -e 's/versionName //g' | tr -d '"')
6868
SHA=${{ github.sha }}
6969
VERSION="$VER+${SHA:0:7}"
7070
echo "Version $VERSION"
@@ -89,7 +89,7 @@ jobs:
8989
if: success()
9090
uses: r0adkll/sign-android-release@v1
9191
with:
92-
releaseDirectory: app/build/outputs/apk/alpha/release
92+
releaseDirectory: androidApp/build/outputs/apk/alpha/release
9393
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
9494
alias: ${{ secrets.ANDROID_KEY_ALIAS }}
9595
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
@@ -99,14 +99,14 @@ jobs:
9999

100100
- name: Rename APK File
101101
run: |
102-
mv app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk app/build/outputs/apk/alpha/release/awery-alpha.apk
102+
mv androidApp/build/outputs/apk/alpha/release/androidApp-alpha-release-signed.apk androidApp/build/outputs/apk/alpha/release/awery-alpha.apk
103103
104104
- name: Upload Alpha APK
105105
uses: actions/upload-artifact@v4
106106
with:
107107
name: "Alpha APK"
108108
retention-days: 90
109-
path: "app/build/outputs/apk/alpha/release/awery-alpha.apk"
109+
path: "androidApp/build/outputs/apk/alpha/release/awery-alpha.apk"
110110

111111
- name: Upload APK to Discord and Telegram
112112
shell: bash
@@ -271,7 +271,7 @@ jobs:
271271
272272
if [ "$SKIP_BUILD" != "true" ]; then
273273
curl -F "payload_json=${contentbody}" \
274-
-F "Awery_debug=@app/build/outputs/apk/alpha/release/awery-alpha.apk" \
274+
-F "Awery_debug=@androidApp/build/outputs/apk/alpha/release/awery-alpha.apk" \
275275
${{ secrets.DISCORD_WEBHOOK_URL }}
276276
else
277277
echo "Skipping APK upload to Discord due to SKIP_BUILD being set to true"
@@ -298,7 +298,7 @@ jobs:
298298
echo "$telegram_dev_info"
299299
300300
if [ "$SKIP_BUILD" != "true" ]; then
301-
APK_PATH="app/build/outputs/apk/alpha/release/awery-alpha.apk"
301+
APK_PATH="androidApp/build/outputs/apk/alpha/release/awery-alpha.apk"
302302
response=$(curl -sS -f -X POST \
303303
"https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument" \
304304
-F "chat_id=-1002206819738" \
File renamed without changes.

androidApp/mobile/build.gradle.kts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
plugins {
2+
alias(libs.plugins.android.app)
3+
alias(libs.plugins.android.kotlin)
4+
alias(libs.plugins.compose.compiler)
5+
}
6+
7+
android {
8+
namespace = "com.mrboomdev.awery.mobile"
9+
compileSdk = 34
10+
11+
defaultConfig {
12+
applicationId = "com.mrboomdev.awery.mobile"
13+
minSdk = 24
14+
targetSdk = 34
15+
versionCode = 1
16+
versionName = "1.0"
17+
18+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
19+
}
20+
21+
buildTypes {
22+
release {
23+
isMinifyEnabled = false
24+
proguardFiles(
25+
getDefaultProguardFile("proguard-android-optimize.txt"),
26+
"proguard-rules.pro"
27+
)
28+
}
29+
}
30+
compileOptions {
31+
sourceCompatibility = JavaVersion.VERSION_11
32+
targetCompatibility = JavaVersion.VERSION_11
33+
}
34+
kotlinOptions {
35+
jvmTarget = "11"
36+
}
37+
buildFeatures {
38+
compose = true
39+
}
40+
}
41+
42+
dependencies {
43+
44+
implementation(libs.androidx.core)
45+
implementation(libs.androidx.lifecycle.runtime.ktx)
46+
implementation(libs.androidx.compose.activity)
47+
implementation(platform(libs.androidx.compose.bom))
48+
implementation(libs.androidx.compose.ui)
49+
implementation(libs.androidx.ui.graphics)
50+
implementation(libs.androidx.ui.tooling.preview)
51+
implementation(libs.androidx.compose.material3)
52+
testImplementation(libs.junit)
53+
androidTestImplementation(libs.androidx.junit)
54+
androidTestImplementation(libs.androidx.espresso.core)
55+
androidTestImplementation(platform(libs.androidx.compose.bom))
56+
androidTestImplementation(libs.androidx.ui.test.junit4)
57+
debugImplementation(libs.androidx.compose.ui.tooling)
58+
debugImplementation(libs.androidx.ui.test.manifest)
59+
}
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 com.mrboomdev.awery.mobile
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("com.mrboomdev.awery.mobile", appContext.packageName)
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<application
5+
android:allowBackup="true"
6+
android:icon="@mipmap/ic_launcher"
7+
android:label="@string/app_name"
8+
android:roundIcon="@mipmap/ic_launcher_round"
9+
android:supportsRtl="true"
10+
android:theme="@style/Theme.Awery">
11+
<activity
12+
android:name=".MainActivity"
13+
android:exported="true"
14+
android:label="@string/app_name"
15+
android:theme="@style/Theme.Awery">
16+
<intent-filter>
17+
<action android:name="android.intent.action.MAIN" />
18+
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
24+
</manifest>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.mrboomdev.awery.mobile
2+
3+
import android.os.Bundle
4+
import androidx.activity.ComponentActivity
5+
import androidx.activity.compose.setContent
6+
import androidx.activity.enableEdgeToEdge
7+
import androidx.compose.foundation.layout.fillMaxSize
8+
import androidx.compose.foundation.layout.padding
9+
import androidx.compose.material3.Scaffold
10+
import androidx.compose.material3.Text
11+
import androidx.compose.runtime.Composable
12+
import androidx.compose.ui.Modifier
13+
import androidx.compose.ui.tooling.preview.Preview
14+
import com.mrboomdev.awery.mobile.ui.theme.AweryTheme
15+
16+
class MainActivity : ComponentActivity() {
17+
override fun onCreate(savedInstanceState: Bundle?) {
18+
super.onCreate(savedInstanceState)
19+
enableEdgeToEdge()
20+
setContent {
21+
AweryTheme {
22+
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
23+
Greeting(
24+
name = "Android",
25+
modifier = Modifier.padding(innerPadding)
26+
)
27+
}
28+
}
29+
}
30+
}
31+
}
32+
33+
@Composable
34+
fun Greeting(name: String, modifier: Modifier = Modifier) {
35+
Text(
36+
text = "Hello $name!",
37+
modifier = modifier
38+
)
39+
}
40+
41+
@Preview(showBackground = true)
42+
@Composable
43+
fun GreetingPreview() {
44+
AweryTheme {
45+
Greeting("Android")
46+
}
47+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.mrboomdev.awery.mobile.ui.theme
2+
3+
import androidx.compose.ui.graphics.Color
4+
5+
val Purple80 = Color(0xFFD0BCFF)
6+
val PurpleGrey80 = Color(0xFFCCC2DC)
7+
val Pink80 = Color(0xFFEFB8C8)
8+
9+
val Purple40 = Color(0xFF6650a4)
10+
val PurpleGrey40 = Color(0xFF625b71)
11+
val Pink40 = Color(0xFF7D5260)

0 commit comments

Comments
 (0)