Commit 060ca300 authored by zhuchuanyong's avatar zhuchuanyong

feat: 打包

parent c95592fc
API_URL=http://dev.vtstar.net/
APP_NAME=RN-开发
\ No newline at end of file
APP_NAME='RN-开发'
APP_ID=com.vtrndev
VERSIONCODE=1
VERSIONNAME=1.0.0
\ No newline at end of file
API_URL=http://pro.vtstar.net/
APP_NAME=RN-生产
\ No newline at end of file
APP_NAME='RN-生产'
APP_ID=com.vtrnpro
VERSIONCODE=1
VERSIONNAME=1.0.0
\ No newline at end of file
API_URL=http://test.vtstar.net/
APP_NAME=RN-test
\ No newline at end of file
APP_NAME='RN-test'
APP_ID=com.vtrntest
VERSIONCODE=1
VERSIONNAME=1.0.0
\ No newline at end of file
......@@ -129,11 +129,13 @@ android {
}
defaultConfig {
applicationId "com.vtrnprestudy"
applicationId project.env.get('APP_ID')
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
versionCode project.env.get('VERSIONCODE').toInteger()
versionName project.env.get('VERSIONNAME')
resValue "string", "build_config_package", "com.vtrnprestudy"
}
splits {
abi {
......
<resources>
<string name="app_name">VtRnPreStudy</string>
<string name="app_name">@string/APP_NAME</string>
</resources>
......@@ -4,11 +4,16 @@
"private": true,
"scripts": {
"android": "react-native run-android",
"android:test": "SET ENVFILE=.env.test && react-native run-android",
"android:pro": "SET ENVFILE=.env.production && react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"icon": "node ./src/script/iconScript.js"
"icon": "node ./src/script/iconScript.js",
"build": "cd android && gradlew assembleRelease",
"build:test": "cd android && SET ENVFILE=.env.test && gradlew assembleRelease",
"build:pro": "cd android && SET ENVFILE=.env.production && gradlew assembleRelease"
},
"dependencies": {
"@ant-design/react-native": "^4.0.7",
......
......@@ -2,7 +2,7 @@
* @Author: zhuchuanyong
* @Date: 2021-01-25 14:44:12
* @LastEditors: zhuchuanyong
* @LastEditTime: 2021-01-29 11:04:17
* @LastEditTime: 2021-01-30 00:00:12
* @FilePath: \src\views\Home.js
*/
import {Button} from '@ant-design/react-native';
......@@ -23,7 +23,10 @@ const Home = (props) => {
<>
<View>
<Text>{Config.API_URL}</Text>
<Text>{Config.APP_NAME}</Text>
<Text>{Config.APP_ID}</Text>
<Text>{Config.VERSION_NAME}</Text>
<Text>{Config.VERSIONCODE}</Text>
</View>
<Button type="primary" onPress={() => gotoDetail()}>
Home
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment