Skip to content

Commit 2ba5ef9

Browse files
committed
added demos
1 parent eafd10a commit 2ba5ef9

38 files changed

+1241
-0
lines changed

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: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
* Copyright 2023 teogor (Teodor Grigor)
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
plugins {
17+
alias(libs.plugins.androidApplication)
18+
alias(libs.plugins.kotlinAndroid)
19+
}
20+
21+
android {
22+
namespace = "dev.teogor.drifter.demo"
23+
compileSdk = 34
24+
25+
defaultConfig {
26+
applicationId = "dev.teogor.drifter.demo"
27+
minSdk = 24
28+
targetSdk = 34
29+
versionCode = 1
30+
versionName = "1.0.0-alpha01"
31+
32+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
33+
vectorDrawables {
34+
useSupportLibrary = true
35+
}
36+
}
37+
38+
buildTypes {
39+
release {
40+
isMinifyEnabled = false
41+
proguardFiles(
42+
getDefaultProguardFile("proguard-android-optimize.txt"),
43+
"proguard-rules.pro",
44+
)
45+
signingConfig = signingConfigs.getByName("debug")
46+
}
47+
}
48+
compileOptions {
49+
sourceCompatibility = JavaVersion.VERSION_11
50+
targetCompatibility = JavaVersion.VERSION_11
51+
}
52+
kotlinOptions {
53+
jvmTarget = JavaVersion.VERSION_11.toString()
54+
}
55+
buildFeatures {
56+
compose = true
57+
}
58+
composeOptions {
59+
kotlinCompilerExtensionVersion = "1.5.1"
60+
}
61+
packaging {
62+
resources {
63+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
64+
}
65+
}
66+
}
67+
68+
dependencies {
69+
implementation(project(":module-unity"))
70+
71+
implementation(project(":drifter-compose"))
72+
implementation(project(":drifter-core"))
73+
implementation(project(":drifter-integration"))
74+
implementation(project(":drifter-wallpaper"))
75+
76+
implementation(libs.gson)
77+
implementation(libs.core.ktx)
78+
implementation(libs.lifecycle.runtime.ktx)
79+
implementation(libs.activity.compose)
80+
implementation(platform(libs.compose.bom))
81+
implementation(libs.ui)
82+
implementation(libs.ui.graphics)
83+
implementation(libs.ui.tooling.preview)
84+
implementation(libs.material3)
85+
testImplementation(libs.junit)
86+
androidTestImplementation(libs.androidx.test.ext.junit)
87+
androidTestImplementation(libs.espresso.core)
88+
androidTestImplementation(platform(libs.compose.bom))
89+
androidTestImplementation(libs.ui.test.junit4)
90+
debugImplementation(libs.ui.tooling)
91+
debugImplementation(libs.ui.test.manifest)
92+
}

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

app/src/main/AndroidManifest.xml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2023 teogor (Teodor Grigor)
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18+
xmlns:tools="http://schemas.android.com/tools">
19+
20+
<!-- STORAGE -->
21+
<uses-permission
22+
android:name="android.permission.READ_EXTERNAL_STORAGE"
23+
tools:node="remove" />
24+
<uses-permission
25+
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
26+
android:maxSdkVersion="28"
27+
tools:node="remove" />
28+
<uses-permission
29+
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
30+
tools:ignore="ScopedStorage"
31+
tools:node="remove" />
32+
33+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
34+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
35+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
36+
<uses-permission android:name="android.permission.VIBRATE" />
37+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
38+
<uses-permission android:name="android.permission.INTERNET" />
39+
<uses-permission android:name="android.permission.WAKE_LOCK" />
40+
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
41+
42+
<uses-permission android:name="android.permission.SET_WALLPAPER" />
43+
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
44+
45+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
46+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
47+
48+
<uses-feature
49+
android:name="android.hardware.sensor.gyroscope"
50+
android:required="false" />
51+
<uses-feature
52+
android:name="android.hardware.sensor.accelerometer"
53+
android:required="false" />
54+
55+
<uses-feature
56+
android:name="android.software.live_wallpaper"
57+
android:required="true" />
58+
59+
<!--Unity-->
60+
<uses-feature android:glEsVersion="0x00030000" />
61+
<uses-feature
62+
android:name="android.hardware.touchscreen"
63+
android:required="false" />
64+
<uses-feature
65+
android:name="android.hardware.touchscreen.multitouch"
66+
android:required="false" />
67+
<uses-feature
68+
android:name="android.hardware.touchscreen.multitouch.distinct"
69+
android:required="false" />
70+
<uses-feature
71+
android:name="android.software.leanback"
72+
android:required="false" />
73+
74+
<application
75+
android:allowBackup="true"
76+
android:dataExtractionRules="@xml/data_extraction_rules"
77+
android:fullBackupContent="@xml/backup_rules"
78+
android:icon="@mipmap/ic_launcher"
79+
android:label="@string/app_name"
80+
android:roundIcon="@mipmap/ic_launcher_round"
81+
android:supportsRtl="true"
82+
android:theme="@style/Theme.UnityView"
83+
tools:targetApi="31">
84+
85+
<activity
86+
android:name=".MainActivity"
87+
android:exported="true"
88+
android:label="@string/app_name"
89+
android:theme="@style/Theme.UnityView">
90+
<intent-filter>
91+
<action android:name="android.intent.action.MAIN" />
92+
93+
<category android:name="android.intent.category.LAUNCHER" />
94+
</intent-filter>
95+
96+
<meta-data
97+
android:name="unityplayer.UnityActivity"
98+
android:value="true" />
99+
<meta-data
100+
android:name="android.notch_support"
101+
android:value="true" />
102+
</activity>
103+
104+
<service
105+
android:name="dev.teogor.drifter.wallpaper.UnityWallpaperService"
106+
android:enabled="true"
107+
android:exported="true"
108+
android:label="Live Wallpaper ZeoOwl"
109+
android:permission="android.permission.BIND_WALLPAPER">
110+
<intent-filter>
111+
<action android:name="android.service.wallpaper.WallpaperService" />
112+
</intent-filter>
113+
<meta-data
114+
android:name="android.service.wallpaper"
115+
android:resource="@xml/wallpaper" />
116+
</service>
117+
</application>
118+
119+
</manifest>
12.7 KB
Loading

0 commit comments

Comments
 (0)