Commit 552cc250 authored by 张释方's avatar 张释方

Merge remote-tracking branch 'origin/branche_zsf' into branche_zsf

parents 2207581e 48a74b8d
*.iml *.iml
*.log
.gradle .gradle
/local.properties /local.properties
/.idea /.idea
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/vcs.xml
/.idea/assetWizardSettings.xml
.DS_Store .DS_Store
/build /build
/captures /captures
......
3D_Street_view
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$PROJECT_DIR$/../../android/kfTools/Android Studio/gradle/gradle-2.4" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/library_base" />
<option value="$PROJECT_DIR$/mvvmhabit" />
<option value="$PROJECT_DIR$/shareSdkLib" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://maven.aliyun.com/nexus/content/repositories/jcenter" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="https://oss.jfrog.org/libs-snapshot" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="SuppressKotlinCodeStyleNotification">
<option name="disableForAll" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -180,4 +180,8 @@ dependencies { ...@@ -180,4 +180,8 @@ dependencies {
kapt 'com.cuieney:rxpay-compiler:2.1.1' kapt 'com.cuieney:rxpay-compiler:2.1.1'
implementation 'com.romandanylyk:pageindicatorview:1.0.3' implementation 'com.romandanylyk:pageindicatorview:1.0.3'
implementation(name: 'BaiduLBS_AndroidSDK_Lib', ext: 'aar')
} }
\ No newline at end of file
...@@ -410,6 +410,12 @@ ...@@ -410,6 +410,12 @@
# ======================= 穿山甲 GroMore END ================ # ======================= 穿山甲 GroMore END ================
# ===================== 百度地图 START ================
-keep class com.baidu.** {*;}
-keep class vi.com.** {*;}
-keep class com.baidu.vi.** {*;}
-dontwarn com.baidu.**
# ===================== 百度地图 END ================
......
...@@ -3,29 +3,23 @@ ...@@ -3,29 +3,23 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.mints.street"> package="com.mints.street">
<uses-permission android:name="android.permission.INTERNET" /> <!-- 这个权限用于进行网络定位 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- 这个权限用于访问GPS定位 -->
<uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 获取网络状态,根据网络状态切换进行数据请求网络转换 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" /> <!-- 写外置存储。如果开发者使用了离线地图,并且数据写在外置存储区域,则需要申请该权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- 读取外置存储。如果开发者使用了so动态加载功能并且把so文件放在了外置存储区域,则需要申请该权限,否则不需要 -->
<uses-permission android:name="android.permission.WRITE_SETTINGS" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> <!-- 访问网络,进行地图相关业务数据请求,包括地图数据,路线规划,POI检索等 -->
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" <uses-permission android:name="android.permission.INTERNET" />
tools:ignore="ProtectedPermissions" /> <!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限)-->
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> <uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<application <application
android:name="com.mints.street.AppApplication" android:name="com.mints.street.AppApplication"
...@@ -64,6 +58,13 @@ ...@@ -64,6 +58,13 @@
<meta-data <meta-data
android:name="Mob-AppSecret" android:name="Mob-AppSecret"
android:value="${SHARE_SECRET}" /> android:value="${SHARE_SECRET}" />
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="SD6luBGzUFSVEZ3n9Xjk3xTsvDFmuRCi" /><!--百度地图开放平台 -->
<!--百度地图开放平台 service-->
<service android:name="com.baidu.location.f"
android:enabled="true"
android:process=":remote"/>
<activity android:name="com.mints.street.splash.SplashActivity" <activity android:name="com.mints.street.splash.SplashActivity"
android:excludeFromRecents="true" android:excludeFromRecents="true"
......
package com.mints.street package com.mints.street
import android.content.Context
import android.os.StrictMode import android.os.StrictMode
import android.os.StrictMode.VmPolicy import android.os.StrictMode.VmPolicy
import android.util.Log import android.util.Log
import com.baidu.mapapi.CoordType
import com.baidu.mapapi.SDKInitializer
import com.cuieney.rxpay_annotation.WX import com.cuieney.rxpay_annotation.WX
import com.fry.base.base.BaseApp import com.fry.base.base.BaseApp
import com.mints.street.manager.CsjGroMoreManager import com.mints.street.manager.CsjGroMoreManager
...@@ -46,6 +47,13 @@ class AppApplication : BaseApp() { ...@@ -46,6 +47,13 @@ class AppApplication : BaseApp() {
// GroMore // GroMore
CsjGroMoreManager.init(this) CsjGroMoreManager.init(this)
//百度地图
// 在使用 SDK 各组间之前初始化 context 信息,传入 ApplicationContext
// 默认本地个性化地图初始化方法
SDKInitializer.initialize(this)
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
//包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。
SDKInitializer.setCoordType(CoordType.BD09LL)
} }
companion object { companion object {
......
package com.mints.street.main package com.mints.street.main
import android.media.AudioManager import android.Manifest
import android.os.Bundle import android.os.Bundle
import android.view.KeyEvent import android.view.KeyEvent
import android.view.View import android.view.View
...@@ -15,10 +15,12 @@ import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx ...@@ -15,10 +15,12 @@ import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.ActivityMainBinding import com.mints.street.databinding.ActivityMainBinding
import com.mints.street.main.vr.VRFragment
import com.mints.street.main.my.MyFragment
import com.mints.street.main.home.HomeFragment import com.mints.street.main.home.HomeFragment
import com.mints.street.main.my.MyFragment
import com.mints.street.main.vr.VRFragment
import com.mints.street.manager.UmengManager import com.mints.street.manager.UmengManager
import com.tbruyelle.rxpermissions2.RxPermissions
import kotlinx.android.synthetic.main.layout_popupwindow.*
import me.goldze.mvvmhabit.base.AppManager import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.ToastUtils import me.goldze.mvvmhabit.utils.ToastUtils
...@@ -58,6 +60,13 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() { ...@@ -58,6 +60,13 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
// test // test
UmengManager.initUm() UmengManager.initUm()
val rxPermissions = RxPermissions(this )
rxPermissions.request(Manifest.permission.ACCESS_COARSE_LOCATION)
.subscribe {
}
} }
var oldTime: Long = 0 var oldTime: Long = 0
......
package com.mints.street.main.home package com.mints.street.main.home
import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView
import com.baidu.mapapi.map.*
import com.baidu.mapapi.model.LatLng
import com.baidu.mapapi.search.core.RecommendStopInfo
import com.baidu.mapapi.search.recommendstop.OnGetRecommendStopResultListener
import com.baidu.mapapi.search.recommendstop.RecommendStopResult
import com.baidu.mapapi.search.recommendstop.RecommendStopSearch
import com.baidu.mapapi.search.recommendstop.RecommendStopSearchOption
import com.fry.base.base.BaseFragment import com.fry.base.base.BaseFragment
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.FragmentHomeBinding import com.mints.street.databinding.FragmentHomeBinding
import me.goldze.mvvmhabit.utils.KLog
import me.goldze.mvvmhabit.utils.RxUtils
/** /**
* Created by 冯瑞雨 on 2021/7/2. * Created by 冯瑞雨 on 2021/7/2.
* 首页页面 * 首页页面
*/ */
class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>() { class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>(){
private var mBaiduMap: BaiduMap? = null
private val mBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.icon_gcoding)
private var mRecommendStopSearch: RecommendStopSearch? = null
override fun initContentView(inflater: LayoutInflater?, override fun initContentView(inflater: LayoutInflater?,
container: ViewGroup?, container: ViewGroup?,
savedInstanceState: Bundle?)= R.layout.fragment_home savedInstanceState: Bundle?)= R.layout.fragment_home
...@@ -21,6 +41,112 @@ class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>() { ...@@ -21,6 +41,112 @@ class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>() {
override fun initData() { override fun initData() {
super.initData() super.initData()
initMap()
viewModel.add() viewModel.add()
} }
private fun initMap(){
mBaiduMap = binding.bmapView.map
mBaiduMap?.mapType = BaiduMap.MAP_TYPE_SATELLITE
binding.bmapView.showZoomControls(false)//设置是否显示缩放控件
// 构建地图状态
val builder = MapStatus.Builder()
// 默认 天安门
val center = LatLng(39.915071, 116.403907)
// 默认 11级
val zoom = 11.0f
builder.target(center).zoom(zoom)
val mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(builder.build())
// 设置地图状态
mBaiduMap?.setMapStatus(mapStatusUpdate)
mBaiduMap?.setOnMapStatusChangeListener(object :BaiduMap.OnMapStatusChangeListener{
override fun onMapStatusChangeStart(status: MapStatus?) {
KLog.a("百度map","移动开始")
}
override fun onMapStatusChangeStart(status: MapStatus?, reason: Int) {
KLog.a("百度map","移动开始,两个参数")
}
override fun onMapStatusChange(status: MapStatus?) {
KLog.a("百度map","移动改变")
}
override fun onMapStatusChangeFinish(status: MapStatus?) {
KLog.a("百度map","移动结束")
val center = status?.target
mRecommendStopSearch?.requestRecommendStop(RecommendStopSearchOption().location(center))
}
})
mBaiduMap?.setOnMapLoadedCallback {
mRecommendStopSearch?.requestRecommendStop(RecommendStopSearchOption().location(center))
}
//使地图缩放级别增大一级
binding.imageIn.setOnClickListener {
mBaiduMap?.setMapStatus(MapStatusUpdateFactory.zoomIn())
}
//使地图缩放级别减小一级
binding.imageOut.setOnClickListener {
mBaiduMap?.setMapStatus(MapStatusUpdateFactory.zoomOut())
}
mRecommendStopSearch = RecommendStopSearch.newInstance()
mRecommendStopSearch?.setOnGetRecommendStopResultListener(object :OnGetRecommendStopResultListener{
override fun onGetRecommendStopResult(result: RecommendStopResult?) {
if (result != null) {
addMarkerToMap(result.recommendStopInfoList)
}
}
})
}
override fun onPause() {
super.onPause()
binding.bmapView.onPause()
}
override fun onResume() {
super.onResume()
binding.bmapView.onResume()
}
override fun onDestroy() {
super.onDestroy()
mRecommendStopSearch?.destroy()
binding.bmapView.onDestroy()
}
/**
* 推荐上车点添加到地图上
* @param stops 推荐上车点列表
*/
private fun addMarkerToMap(stops: List<RecommendStopInfo?>?) {
stops?.apply {
mBaiduMap?.clear()
for (stop in this) {
stop?.apply {
val textView = TextView(context)
textView.text = stop.name
textView.setBackgroundColor(Color.WHITE)
val infoWindow = InfoWindow(
textView,
stop.location, -47
)
val markerOptions = MarkerOptions()
markerOptions.icon(mBitmapDescriptor).position(stop.location).scaleX(0.5f).scaleY(0.5f)
.infoWindow(infoWindow)
mBaiduMap!!.addOverlay(markerOptions)
}
}
}
}
} }
\ No newline at end of file
...@@ -11,6 +11,23 @@ ...@@ -11,6 +11,23 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<com.baidu.mapapi.map.MapView
android:id="@+id/bmapView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="0dp"
android:layout_height="0dp" />
<ImageView
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerInParent="true"
android:src="@mipmap/water_drop"/>
<ImageView <ImageView
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
...@@ -20,6 +37,7 @@ ...@@ -20,6 +37,7 @@
android:layout_width="35dp" android:layout_width="35dp"
android:layout_height="35dp" android:layout_height="35dp"
android:src="@mipmap/map_change_icon" android:src="@mipmap/map_change_icon"
android:visibility="gone"
/> />
<ImageView <ImageView
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
...@@ -50,8 +68,10 @@ ...@@ -50,8 +68,10 @@
android:background="@drawable/shape_gold_card" android:background="@drawable/shape_gold_card"
android:layout_marginEnd="2dp" android:layout_marginEnd="2dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
> >
<ImageView <ImageView
android:id="@+id/image_in"
android:padding="10dp" android:padding="10dp"
android:layout_width="31dp" android:layout_width="31dp"
android:layout_height="31dp" android:layout_height="31dp"
...@@ -65,6 +85,7 @@ ...@@ -65,6 +85,7 @@
android:background="@color/color_333" android:background="@color/color_333"
/> />
<ImageView <ImageView
android:id="@+id/image_out"
android:padding="10dp" android:padding="10dp"
android:layout_width="31dp" android:layout_width="31dp"
android:layout_height="31dp" android:layout_height="31dp"
......
...@@ -10,17 +10,17 @@ apply plugin: 'kotlin-allopen' ...@@ -10,17 +10,17 @@ apply plugin: 'kotlin-allopen'
def buildVersion def buildVersion
android { android {
File versionPropsFile = file('./version.properties') // File versionPropsFile = file('./version.properties')
//
Properties versionProps = new Properties() // Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile)) // versionProps.load(new FileInputStream(versionPropsFile))
//
buildVersion = versionProps['VERSION_BUILD'].toLong() + 1 // buildVersion = versionProps['VERSION_BUILD'].toLong() + 1
versionProps['VERSION_BUILD'] = buildVersion.toString() // versionProps['VERSION_BUILD'] = buildVersion.toString()
versionProps.store(versionPropsFile.newWriter(), null) // versionProps.store(versionPropsFile.newWriter(), null)
//
defaultConfig { defaultConfig {
buildConfigField ("int","BUILD_VERSION","${buildVersion}") // buildConfigField ("int","BUILD_VERSION","${buildVersion}")
} }
noArg { noArg {
......
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