Skip to content

Commit c346b74

Browse files
committed
fix: 更新环境
解决方案:NA 影响范围:all 关联工单:NA 更新版本:NA
1 parent 3a87980 commit c346b74

13 files changed

Lines changed: 2793 additions & 2512 deletions

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
v18
2+
cd
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.printerimin">
3-
</manifest>
3+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
4+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
5+
6+
</manifest>

example/android/app/build.gradle

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,27 @@ android {
7474
compileSdkVersion rootProject.ext.compileSdkVersion
7575

7676
namespace "com.printeriminexample"
77+
78+
buildFeatures {
79+
buildConfig true
80+
}
81+
82+
83+
def date = new Date().format("yyMMddHHmm", TimeZone.getTimeZone("GMT+08"))
84+
def versionCODE = 1
85+
def versionNames = "1.0."+versionCODE+"_"+date
86+
android.applicationVariants.all { variant ->
87+
variant.outputs.all {
88+
outputFileName = "IminPrinterService-"+versionCode+"_V"+versionName+".apk"
89+
}
90+
}
91+
7792
defaultConfig {
7893
applicationId "com.printeriminexample"
7994
minSdkVersion rootProject.ext.minSdkVersion
8095
targetSdkVersion rootProject.ext.targetSdkVersion
81-
versionCode 1
82-
versionName "1.0"
96+
versionCode versionCODE
97+
versionName versionNames
8398
}
8499
signingConfigs {
85100
debug {
@@ -88,12 +103,16 @@ android {
88103
keyAlias 'androiddebugkey'
89104
keyPassword 'android'
90105
}
91-
// release {
92-
// storeFile file('my-release-key.keystore')
93-
// storePassword '123456'
94-
// keyAlias 'my-key-alias'
95-
// keyPassword '123456'
96-
// }
106+
release {
107+
// storeFile file('my-release-key.keystore')
108+
// storePassword '123456'
109+
// keyAlias 'my-key-alias'
110+
// keyPassword '123456'
111+
storeFile file('debug.keystore')
112+
storePassword 'android'
113+
keyAlias 'androiddebugkey'
114+
keyPassword 'android'
115+
}
97116
}
98117
buildTypes {
99118
debug {
@@ -102,7 +121,7 @@ android {
102121
release {
103122
// Caution! In production, you need to generate your own keystore file.
104123
// see https://reactnative.dev/docs/signed-apk-android.
105-
signingConfig signingConfigs.debug
124+
signingConfig signingConfigs.release
106125
minifyEnabled enableProguardInReleaseBuilds
107126
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
108127
// signingConfig signingConfigs.release

example/android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
88
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
99
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
10-
<application
10+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
11+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
12+
13+
<application
1114
android:name=".MainApplication"
1215
android:label="@string/app_name"
1316
android:icon="@mipmap/ic_launcher"

example/android/app/src/main/assets/index.android.bundle

Lines changed: 1516 additions & 1479 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)