Skip to content

Commit efa8935

Browse files
committed
init
1 parent 44e035a commit efa8935

File tree

18 files changed

+1915
-2266
lines changed

18 files changed

+1915
-2266
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ flake.lock
9393
.agents/
9494
.claude/
9595
.jj/
96+
.sisyphus/
Lines changed: 23 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
32
<!-- Internet -->
43
<uses-permission android:name="android.permission.INTERNET" />
54
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -15,56 +14,27 @@
1514

1615

1716
<uses-permission android:name="android.permission.VIBRATE" />
18-
<queries>
19-
<intent>
20-
<action android:name="android.intent.action.TTS_SERVICE" />
21-
</intent>
22-
</queries>
23-
24-
<application
25-
android:name=".MainApplication"
26-
android:largeHeap="true"
27-
android:label="@string/app_name"
28-
android:icon="@mipmap/ic_launcher"
29-
android:roundIcon="@mipmap/ic_launcher"
30-
android:allowBackup="true"
31-
android:theme="@style/AppTheme"
32-
android:usesCleartextTraffic="true"
33-
android:supportsRtl="true">
34-
35-
<meta-data
36-
android:name="expo.modules.notifications.default_notification_icon"
37-
android:resource="@drawable/notification_icon" />
38-
39-
<meta-data
40-
android:name="expo.modules.notifications.default_notification_color"
41-
android:resource="@color/notification_icon_color" />
42-
43-
<activity
44-
android:name=".MainActivity"
45-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
46-
android:launchMode="singleTask"
47-
android:windowSoftInputMode="adjustResize"
48-
android:exported="true"
49-
android:theme="@style/Theme.App.SplashScreen"
50-
android:screenOrientation="unspecified">
51-
52-
<intent-filter>
53-
<action android:name="android.intent.action.MAIN" />
54-
<category android:name="android.intent.category.LAUNCHER" />
55-
</intent-filter>
56-
57-
<intent-filter>
58-
<action android:name="android.intent.action.VIEW" />
59-
<category android:name="android.intent.category.DEFAULT" />
60-
<category android:name="android.intent.category.BROWSABLE" />
61-
<data android:scheme="lnreader" />
62-
</intent-filter>
63-
</activity>
64-
65-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
66-
67-
<service android:name="com.asterinet.react.bgactions.RNBackgroundActionsTask" android:foregroundServiceType="shortService" />
68-
69-
</application>
17+
<queries>
18+
<intent>
19+
<action android:name="android.intent.action.TTS_SERVICE"/>
20+
</intent>
21+
</queries>
22+
<application android:name=".MainApplication" android:largeHeap="true" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" android:supportsRtl="true">
23+
<meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>
24+
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/notification_icon"/>
25+
<service android:name="com.asterinet.react.bgactions.RNBackgroundActionsTask" android:foregroundServiceType="shortService"/>
26+
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|locale|layoutDirection" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="unspecified">
27+
<intent-filter>
28+
<action android:name="android.intent.action.MAIN"/>
29+
<category android:name="android.intent.category.LAUNCHER"/>
30+
</intent-filter>
31+
<intent-filter>
32+
<action android:name="android.intent.action.VIEW"/>
33+
<category android:name="android.intent.category.DEFAULT"/>
34+
<category android:name="android.intent.category.BROWSABLE"/>
35+
<data android:scheme="lnreader"/>
36+
</intent-filter>
37+
</activity>
38+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
39+
</application>
7040
</manifest>

android/app/src/main/java/com/rajarsheechatterjee/LNReader/MainApplication.kt

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
package com.rajarsheechatterjee.LNReader
2+
import expo.modules.ExpoReactHostFactory
23

34
import android.app.Application
45
import android.content.res.Configuration
56
import com.facebook.react.PackageList
67
import com.facebook.react.ReactApplication
78
import com.facebook.react.ReactHost
89
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
9-
import com.facebook.react.ReactNativeHost
10-
import com.facebook.react.ReactPackage
1110
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1211
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
13-
import com.facebook.react.defaults.DefaultReactNativeHost
1412
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1513
import com.facebook.soloader.SoLoader
1614
import com.rajarsheechatterjee.NativeFile.NativePackage
@@ -20,27 +18,19 @@ import com.rajarsheechatterjee.NativeZipArchive.NativeZipArchivePackage
2018
import expo.modules.ApplicationLifecycleDispatcher
2119

2220
class MainApplication : Application(), ReactApplication {
23-
override val reactNativeHost: ReactNativeHost =
24-
object : DefaultReactNativeHost(this) {
25-
override fun getPackages(): List<ReactPackage> =
21+
override val reactHost: ReactHost by lazy {
22+
ExpoReactHostFactory.getDefaultReactHost(
23+
context = applicationContext,
24+
packageList =
2625
PackageList(this).packages.apply {
2726
add(NativePackage())
2827
add(NativeTTSMediaControlPackage())
2928
add(NativeVolumeButtonListenerPackage())
3029
add(NativeZipArchivePackage())
31-
}
32-
33-
override fun getJSMainModuleName(): String = "index"
34-
35-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
36-
37-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
38-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
39-
}
30+
},
31+
)
32+
}
4033

41-
override val reactHost: ReactHost
42-
get() = getDefaultReactHost(applicationContext, reactNativeHost)
43-
4434
override fun onCreate() {
4535
super.onCreate()
4636
loadReactNative(this)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
21
<resources>
32
<string name="app_name">LNReader</string>
4-
</resources>
3+
</resources>
Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,28 @@
1-
<?xml
2-
version="1.0"
3-
encoding="UTF-8"
4-
standalone="yes"
5-
?>
61
<resources xmlns:tools="http://schemas.android.com/tools">
7-
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
8-
<!-- Customize your theme here. -->
2+
<style name="AppTheme" parent="Theme.EdgeToEdge">
93
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
104
<item name="colorPrimary">@color/colorPrimary</item>
115
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
12-
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
13-
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
146
<item name="colorControlActivated">#2596be</item>
7+
<item name="android:windowLightStatusBar">true</item>
158
</style>
16-
179
<style name="SplashScreen_SplashAnimation">
1810
<item name="android:windowExitAnimation">@android:anim/fade_out</item>
1911
</style>
20-
2112
<style name="SplashScreen_SplashTheme" parent="Theme.AppCompat.NoActionBar">
2213
<item name="android:windowAnimationStyle">@style/SplashScreen_SplashAnimation</item>
2314
</style>
24-
2515
<style name="SplashScreenTheme" parent="SplashScreen_SplashTheme">
2616
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
2717
<item name="android:windowActionBar">false</item>
2818
<item name="android:windowNoTitle">true</item>
2919
<item name="android:windowFullscreen">true</item>
3020
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
31-
</style>
21+
</style>
3222
<style name="Theme.App.SplashScreen" parent="AppTheme">
33-
<!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
34-
<!-- Customize your splash screen theme here -->
3523
<item name="android:windowSplashScreenBackground" tools:targetApi="s">@color/colorPrimaryDark</item>
36-
<item name="android:windowSplashScreenAnimatedIcon" tools:targetApi="s" >@drawable/invisible</item>
24+
<item name="android:windowSplashScreenAnimatedIcon" tools:targetApi="s">@drawable/invisible</item>
3725
<item name="android:windowSplashScreenAnimationDuration" tools:targetApi="s">1000</item>
38-
<!-- <item name="icon">@drawable/no_icon</item> -->
3926
<item name="android:windowBackground">@drawable/splashscreen</item>
4027
</style>
41-
</resources>
28+
</resources>

android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ buildscript {
1818
}
1919
}
2020

21-
apply plugin: "com.facebook.react.rootproject"
21+
apply plugin: "com.facebook.react.rootproject"
22+
apply plugin: "expo-root-project"
1.65 KB
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

android/gradlew

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/settings.gradle

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
1-
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2-
plugins { id("com.facebook.react.settings") }
1+
pluginManagement {
2+
def reactNativeGradlePlugin = new File(
3+
providers.exec {
4+
workingDir(rootDir)
5+
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
6+
}.standardOutput.asText.get().trim()
7+
).getParentFile().absolutePath
8+
includeBuild(reactNativeGradlePlugin)
39

4-
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
5-
rootProject.name = 'LNReader'
10+
def expoPluginsPath = new File(
11+
providers.exec {
12+
workingDir(rootDir)
13+
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
14+
}.standardOutput.asText.get().trim(),
15+
"../android/expo-gradle-plugin"
16+
).absolutePath
17+
includeBuild(expoPluginsPath)
18+
}
619

7-
include ':app'
8-
includeBuild('../node_modules/@react-native/gradle-plugin')
20+
plugins {
21+
id("com.facebook.react.settings")
22+
id("expo-autolinking-settings")
23+
}
924

10-
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
11-
useExpoModules()
25+
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
26+
ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
27+
}
28+
29+
rootProject.name = "LNReader"
30+
31+
expoAutolinking.useExpoModules()
32+
expoAutolinking.useExpoVersionCatalog()
33+
34+
include(":app")
35+
includeBuild(expoAutolinking.reactNativeGradlePlugin)

0 commit comments

Comments
 (0)