create-jilatax 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -23
- package/THIRD_PARTY_NOTICES.md +7 -0
- package/dist/bin.cjs +6 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +8 -0
- package/dist/cli-B8DIbCrH.js +387 -0
- package/dist/cli-DMT97_QW.cjs +452 -0
- package/dist/index.cjs +8 -6
- package/dist/index.d.cts +32 -3
- package/dist/index.d.ts +32 -3
- package/dist/index.js +2 -6
- package/package.json +13 -5
- package/template/README.md.tmpl +34 -0
- package/template/android/app/build.gradle.kts +112 -0
- package/template/android/app/proguard-rules.pro +1 -0
- package/template/android/app/src/debug/AndroidManifest.xml +8 -0
- package/template/android/app/src/main/AndroidManifest.xml +30 -0
- package/template/android/app/src/main/res/drawable/jilatax_mark_foreground.xml +11 -0
- package/template/android/app/src/main/res/drawable/jilatax_splash.xml +9 -0
- package/template/android/app/src/main/res/mipmap-anydpi/jilatax_launcher.xml +12 -0
- package/template/android/app/src/main/res/mipmap-anydpi/jilatax_launcher_round.xml +12 -0
- package/template/android/app/src/main/res/mipmap-anydpi-v26/jilatax_launcher.xml +5 -0
- package/template/android/app/src/main/res/mipmap-anydpi-v26/jilatax_launcher_round.xml +5 -0
- package/template/android/app/src/main/res/values/styles.xml +16 -0
- package/template/android/app/src/main/res/values-v31/styles.xml +8 -0
- package/template/android/build.gradle.kts +5 -0
- package/template/android/gradle/wrapper/gradle-wrapper.jar.base64 +1112 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/template/android/gradle.properties +6 -0
- package/template/android/gradlew +248 -0
- package/template/android/gradlew.bat +92 -0
- package/template/android/keystore.properties.example +5 -0
- package/template/android/settings.gradle.kts.tmpl +29 -0
- package/template/gitignore +22 -0
- package/template/lynx.config.ts +25 -0
- package/template/src/App.css +95 -0
- package/template/src/App.tsx.tmpl +23 -0
- package/template/src/index.tsx +9 -0
- package/template/src/rspeedy-env.d.ts +1 -0
- package/template/src/tsconfig.json +13 -0
- package/template/tsconfig.json +15 -0
- package/template/tsconfig.node.json +12 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import java.util.Properties
|
|
2
|
+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
3
|
+
|
|
4
|
+
plugins {
|
|
5
|
+
id("com.android.application")
|
|
6
|
+
id("org.jetbrains.kotlin.android")
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
val jilataxConfigFile = rootProject.file("jilatax.properties")
|
|
10
|
+
check(jilataxConfigFile.isFile) {
|
|
11
|
+
"Missing android/jilatax.properties. Run a Jilatax Android command from the project root."
|
|
12
|
+
}
|
|
13
|
+
val jilataxConfig = Properties().apply {
|
|
14
|
+
jilataxConfigFile.reader(Charsets.UTF_8).use(::load)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
fun requiredConfig(key: String): String =
|
|
18
|
+
checkNotNull(jilataxConfig.getProperty(key)?.takeIf { it.isNotBlank() }) {
|
|
19
|
+
"Missing Jilatax Android property: $key"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
val appName = requiredConfig("jilatax.name")
|
|
23
|
+
val appPackage = requiredConfig("jilatax.android.package")
|
|
24
|
+
val appVersion = requiredConfig("jilatax.version")
|
|
25
|
+
val appVersionCode = requiredConfig("jilatax.android.versionCode").toInt()
|
|
26
|
+
val appScheme = requiredConfig("jilatax.scheme")
|
|
27
|
+
val predictiveBack = requiredConfig(
|
|
28
|
+
"jilatax.android.predictiveBackGestureEnabled",
|
|
29
|
+
).toBooleanStrict()
|
|
30
|
+
val screenOrientation =
|
|
31
|
+
when (requiredConfig("jilatax.orientation")) {
|
|
32
|
+
"portrait" -> "portrait"
|
|
33
|
+
"landscape" -> "landscape"
|
|
34
|
+
else -> "unspecified"
|
|
35
|
+
}
|
|
36
|
+
val splashBackground = requiredConfig("jilatax.splash.backgroundColor")
|
|
37
|
+
|
|
38
|
+
val signingFile = rootProject.file("keystore.properties")
|
|
39
|
+
val signingProperties = Properties()
|
|
40
|
+
val signingKeys = listOf("storeFile", "storePassword", "keyAlias", "keyPassword")
|
|
41
|
+
val signingConfigured = signingFile.isFile
|
|
42
|
+
if (signingConfigured) {
|
|
43
|
+
signingFile.reader(Charsets.UTF_8).use(signingProperties::load)
|
|
44
|
+
check(signingKeys.all { !signingProperties.getProperty(it).isNullOrBlank() }) {
|
|
45
|
+
"android/keystore.properties exists but is incomplete."
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
android {
|
|
50
|
+
namespace = appPackage
|
|
51
|
+
compileSdk = 35
|
|
52
|
+
|
|
53
|
+
defaultConfig {
|
|
54
|
+
applicationId = appPackage
|
|
55
|
+
minSdk = 24
|
|
56
|
+
targetSdk = 35
|
|
57
|
+
versionCode = appVersionCode
|
|
58
|
+
versionName = appVersion
|
|
59
|
+
manifestPlaceholders["jilataxOrientation"] = screenOrientation
|
|
60
|
+
manifestPlaceholders["jilataxPredictiveBack"] = predictiveBack.toString()
|
|
61
|
+
manifestPlaceholders["jilataxScheme"] = appScheme
|
|
62
|
+
resValue("string", "jilatax_app_name", appName)
|
|
63
|
+
resValue("color", "jilatax_icon_background", splashBackground)
|
|
64
|
+
resValue("color", "jilatax_splash_background", splashBackground)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
sourceSets {
|
|
68
|
+
getByName("main").assets.srcDir(file("../../.jilatax/android-assets"))
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
signingConfigs {
|
|
72
|
+
if (signingConfigured) {
|
|
73
|
+
create("release") {
|
|
74
|
+
storeFile = rootProject.file(signingProperties.getProperty("storeFile"))
|
|
75
|
+
storePassword = signingProperties.getProperty("storePassword")
|
|
76
|
+
keyAlias = signingProperties.getProperty("keyAlias")
|
|
77
|
+
keyPassword = signingProperties.getProperty("keyPassword")
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
buildTypes {
|
|
83
|
+
debug {
|
|
84
|
+
isDebuggable = true
|
|
85
|
+
}
|
|
86
|
+
release {
|
|
87
|
+
isMinifyEnabled = false
|
|
88
|
+
if (signingConfigured) {
|
|
89
|
+
signingConfig = signingConfigs.getByName("release")
|
|
90
|
+
}
|
|
91
|
+
proguardFiles(
|
|
92
|
+
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
93
|
+
"proguard-rules.pro",
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
compileOptions {
|
|
99
|
+
sourceCompatibility = JavaVersion.VERSION_11
|
|
100
|
+
targetCompatibility = JavaVersion.VERSION_11
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
kotlin {
|
|
105
|
+
compilerOptions {
|
|
106
|
+
jvmTarget.set(JvmTarget.JVM_11)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
dependencies {
|
|
111
|
+
implementation(project(":jilatax"))
|
|
112
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Jilatax release minification is disabled during the Android foundation phase.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
xmlns:tools="http://schemas.android.com/tools">
|
|
5
|
+
<application
|
|
6
|
+
android:usesCleartextTraffic="true"
|
|
7
|
+
tools:replace="android:usesCleartextTraffic" />
|
|
8
|
+
</manifest>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
+
<application
|
|
4
|
+
android:name="dev.jilatax.android.JilataxApplication"
|
|
5
|
+
android:allowBackup="false"
|
|
6
|
+
android:enableOnBackInvokedCallback="${jilataxPredictiveBack}"
|
|
7
|
+
android:icon="@mipmap/jilatax_launcher"
|
|
8
|
+
android:label="@string/jilatax_app_name"
|
|
9
|
+
android:roundIcon="@mipmap/jilatax_launcher_round"
|
|
10
|
+
android:supportsRtl="true"
|
|
11
|
+
android:theme="@style/Theme.Jilatax"
|
|
12
|
+
android:usesCleartextTraffic="false">
|
|
13
|
+
<activity
|
|
14
|
+
android:name="dev.jilatax.android.JilataxActivity"
|
|
15
|
+
android:exported="true"
|
|
16
|
+
android:screenOrientation="${jilataxOrientation}"
|
|
17
|
+
android:theme="@style/Theme.Jilatax.Starting">
|
|
18
|
+
<intent-filter>
|
|
19
|
+
<action android:name="android.intent.action.MAIN" />
|
|
20
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
21
|
+
</intent-filter>
|
|
22
|
+
<intent-filter>
|
|
23
|
+
<action android:name="android.intent.action.VIEW" />
|
|
24
|
+
<category android:name="android.intent.category.DEFAULT" />
|
|
25
|
+
<category android:name="android.intent.category.BROWSABLE" />
|
|
26
|
+
<data android:scheme="${jilataxScheme}" />
|
|
27
|
+
</intent-filter>
|
|
28
|
+
</activity>
|
|
29
|
+
</application>
|
|
30
|
+
</manifest>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<vector
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
android:width="108dp"
|
|
5
|
+
android:height="108dp"
|
|
6
|
+
android:viewportWidth="108"
|
|
7
|
+
android:viewportHeight="108">
|
|
8
|
+
<path
|
|
9
|
+
android:fillColor="#38BDF8"
|
|
10
|
+
android:pathData="M24,22 L84,22 L84,34 L62,34 L62,68 C62,82 53,90 39,90 C32,90 26,88 21,84 L27,73 C31,76 35,78 39,78 C46,78 50,74 50,67 L50,34 L24,34 Z" />
|
|
11
|
+
</vector>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
+
<item android:drawable="@color/jilatax_splash_background" />
|
|
4
|
+
<item
|
|
5
|
+
android:width="108dp"
|
|
6
|
+
android:height="108dp"
|
|
7
|
+
android:drawable="@drawable/jilatax_mark_foreground"
|
|
8
|
+
android:gravity="center" />
|
|
9
|
+
</layer-list>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<vector
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
android:width="108dp"
|
|
5
|
+
android:height="108dp"
|
|
6
|
+
android:viewportWidth="108"
|
|
7
|
+
android:viewportHeight="108">
|
|
8
|
+
<path android:fillColor="#0F172A" android:pathData="M0,0 L108,0 L108,108 L0,108 Z" />
|
|
9
|
+
<path
|
|
10
|
+
android:fillColor="#38BDF8"
|
|
11
|
+
android:pathData="M24,22 L84,22 L84,34 L62,34 L62,68 C62,82 53,90 39,90 C32,90 26,88 21,84 L27,73 C31,76 35,78 39,78 C46,78 50,74 50,67 L50,34 L24,34 Z" />
|
|
12
|
+
</vector>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<vector
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
|
+
android:width="108dp"
|
|
5
|
+
android:height="108dp"
|
|
6
|
+
android:viewportWidth="108"
|
|
7
|
+
android:viewportHeight="108">
|
|
8
|
+
<path android:fillColor="#0F172A" android:pathData="M54,4 A50,50 0,1 0,54 104 A50,50 0,1 0,54 4" />
|
|
9
|
+
<path
|
|
10
|
+
android:fillColor="#38BDF8"
|
|
11
|
+
android:pathData="M24,22 L84,22 L84,34 L62,34 L62,68 C62,82 53,90 39,90 C32,90 26,88 21,84 L27,73 C31,76 35,78 39,78 C46,78 50,74 50,67 L50,34 L24,34 Z" />
|
|
12
|
+
</vector>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<resources>
|
|
3
|
+
<style name="Theme.Jilatax" parent="android:style/Theme.Material.Light.NoActionBar">
|
|
4
|
+
<item name="android:colorAccent">#38BDF8</item>
|
|
5
|
+
<item name="android:navigationBarColor">@color/jilatax_splash_background</item>
|
|
6
|
+
<item name="android:statusBarColor">@color/jilatax_splash_background</item>
|
|
7
|
+
<item name="android:windowActionModeOverlay">true</item>
|
|
8
|
+
<item name="android:windowLightNavigationBar">false</item>
|
|
9
|
+
<item name="android:windowLightStatusBar">false</item>
|
|
10
|
+
<item name="android:windowNoTitle">true</item>
|
|
11
|
+
</style>
|
|
12
|
+
|
|
13
|
+
<style name="Theme.Jilatax.Starting" parent="Theme.Jilatax">
|
|
14
|
+
<item name="android:windowBackground">@drawable/jilatax_splash</item>
|
|
15
|
+
</style>
|
|
16
|
+
</resources>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<resources>
|
|
3
|
+
<style name="Theme.Jilatax.Starting" parent="Theme.Jilatax">
|
|
4
|
+
<item name="android:windowSplashScreenAnimatedIcon">@drawable/jilatax_mark_foreground</item>
|
|
5
|
+
<item name="android:windowSplashScreenAnimationDuration">300</item>
|
|
6
|
+
<item name="android:windowSplashScreenBackground">@color/jilatax_splash_background</item>
|
|
7
|
+
</style>
|
|
8
|
+
</resources>
|