处理16k问题
升级AGP到8.6.0
升级targetSdkVersion到35
优化编译打包
| | |
| | | /captures |
| | | .externalNativeBuild |
| | | .cxx |
| | | /.idea/ |
| | |
| | | apply plugin: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' |
| | | |
| | | android { |
| | | compileSdkVersion 34 |
| | | compileSdkVersion 35 |
| | | buildToolsVersion "33.0.3" |
| | | namespace "com.driver.igotrip" |
| | | packagingOptions { |
| | | jniLibs { |
| | | useLegacyPackaging true |
| | | } |
| | | exclude 'META-INF/*' |
| | | exclude 'META-INF/NOTICE' // will not include NOTICE file |
| | | exclude 'META-INF/LICENSE' // will not include LICENSE file |
| | |
| | | defaultConfig { |
| | | applicationId "com.driver.goposttrip" |
| | | minSdkVersion 23 |
| | | targetSdkVersion 34 |
| | | targetSdkVersion 35 |
| | | versionCode 31 |
| | | versionName "1.5.2" |
| | | multiDexEnabled true |
| | |
| | | // Flag to enable support for the new language APIs |
| | | coreLibraryDesugaringEnabled true |
| | | // Sets Java compatibility to Java 8 |
| | | sourceCompatibility JavaVersion.VERSION_1_8 |
| | | targetCompatibility JavaVersion.VERSION_1_8 |
| | | sourceCompatibility JavaVersion.VERSION_17 |
| | | targetCompatibility JavaVersion.VERSION_17 |
| | | } |
| | | |
| | | kotlinOptions { |
| | | jvmTarget = "17" // 与上面保持一致 |
| | | } |
| | | lintOptions { |
| | | checkReleaseBuilds false |
| | | abortOnError false |
| | |
| | | exclude 'com/google/android/gms/maps/mapbox/**/*.xml' |
| | | } |
| | | |
| | | |
| | | buildFeatures { |
| | | buildConfig = true // 显式启用 BuildConfig |
| | | } |
| | | |
| | | } |
| | | // 在文件末尾添加 |
| | | afterEvaluate { |
| | | android.applicationVariants.all { variant -> |
| | | def variantName = variant.name |
| | | // 找到对应变体的bundle任务 |
| | | def bundleTask = tasks.findByName("bundle${variantName.capitalize()}") |
| | | if (bundleTask != null) { |
| | | bundleTask.doLast { |
| | | // 输出目录 |
| | | def outputDir = file("${rootDir}/app/${variantName}/") |
| | | if (outputDir.exists()) { |
| | | outputDir.listFiles().each { file -> |
| | | if (file.name.endsWith('.aab') || file.name.endsWith('.apk')) { |
| | | // 获取当前时间戳 |
| | | def timestamp = new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+08")) |
| | | |
| | | // 构建新的文件名 |
| | | def newName = file.name.replace("app-${variantName}", "GoPost-driver-${variant.versionName}-${timestamp}") |
| | | |
| | | // 重命名文件 |
| | | def newFile = new File(file.parentFile, newName) |
| | | |
| | | if (file.renameTo(newFile)) { |
| | | println "✅ 文件重命名成功: ${file.name} -> ${newFile.name}" |
| | | println "📁 文件路径: ${newFile.absolutePath}" |
| | | } else { |
| | | println "❌ 文件重命名失败: ${file.name}" |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | println "⚠️ 目录不存在: ${outputDir.absolutePath}" |
| | | } |
| | | } |
| | | } else { |
| | | println "⚠️ 未找到任务: ${bundleTaskName}" |
| | | } |
| | | } |
| | | } |
| | | |
| | | repositories { |
| | | flatDir { |
| | |
| | | } |
| | | |
| | | dependencies { |
| | | implementation fileTree(include: ['*.jar'], dir: 'libs') |
| | | implementation fileTree(include: ['*.jar','*.aar'], dir: 'libs') |
| | | implementation "com.facebook.soloader:soloader:0.12.1" |
| | | implementation(name: 'alipaySdk-15.7.5-20200422171619', ext: 'aar') |
| | | implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.0" |
| | | implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.7.0' |
| | | implementation 'com.tencent.mm.opensdk:wechat-sdk-android:6.8.34' |
| | | implementation 'androidx.appcompat:appcompat:1.1.0' |
| | | implementation 'androidx.core:core-ktx:1.2.0' |
| | | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' |
| | |
| | | implementation 'com.mobsandgeeks:android-saripaar:2.0.0' |
| | | implementation 'androidx.multidex:multidex:2.0.1' |
| | | implementation 'com.github.zackratos.ultimatebar:ultimatebar3:3.1.1' |
| | | // implementation 'com.aliyun.dpa:oss-android-sdk:2.9.2' |
| | | implementation 'com.huaweicloud:esdk-obs-android:3.21.12' |
| | | |
| | | //http日志拦截器 |
| | | api 'com.squareup.okhttp3:logging-interceptor:4.9.1' |
| | | implementation 'org.greenrobot:eventbus:3.1.1' |
| | | implementation 'com.github.bumptech.glide:glide:4.9.0' |
| | | annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0' |
| | |
| | | implementation 'pub.devrel:easypermissions:1.3.0' |
| | | implementation 'liji.library.dev:citypickerview:5.2.1' |
| | | implementation 'com.ypx.yimagepicker:androidx:3.1.4' |
| | | implementation files('libs/umeng-common-2.2.5.jar') |
| | | implementation files('libs/umeng-share-core-7.0.0.jar') |
| | | implementation files('libs/umeng-share-QQ-simplify-7.0.0.jar') |
| | | implementation files('libs/umeng-share-wechat-simplify-7.0.0.jar') |
| | | implementation project(path: ':rxnetty') |
| | | implementation files('libs/Sunflower.jar') |
| | | implementation files('libs/Msc.jar') |
| | | implementation 'com.wang.avi:library:2.1.3' |
| | | implementation 'com.google.zxing:core:3.3.0' |
| | | implementation 'cn.jiguang.sdk:jpush:3.6.6' // 此处以JPush 3.6.6 版本为例。 |
| | | implementation 'cn.jiguang.sdk:jcore:2.3.8' // 此处以JCore 2.3.8 版本为例。 |
| | | implementation 'cn.jiguang.sdk:jpush:6.0.2' // 此处以JPush 3.6.6 版本为例。 |
| | | implementation 'cn.jiguang.sdk:jcore:5.3.1' // 此处以JCore 2.3.8 版本为例。 |
| | | implementation 'com.tencent.bugly:crashreport:latest.release' |
| | | // implementation ('com.google.android.gms:play-services-maps:18.0.2') |
| | | // { |
| | |
| | | |
| | | |
| | | //cameraX |
| | | implementation "androidx.camera:camera-core:1.3.1" |
| | | implementation "androidx.camera:camera-camera2:1.3.1" |
| | | implementation "androidx.camera:camera-lifecycle:1.3.1" |
| | | implementation "androidx.camera:camera-view:1.3.1" |
| | | implementation "androidx.camera:camera-core:1.4.2" |
| | | implementation "androidx.camera:camera-camera2:1.4.2" |
| | | implementation "androidx.camera:camera-lifecycle:1.4.2" |
| | | implementation "androidx.camera:camera-view:1.4.2" |
| | | |
| | | implementation 'top.zibin:Luban:1.1.8' |
| | | |
| | | |
| | | implementation project(path: ':easyfloat') |
| | | |
| | | |
| | | //友盟 |
| | | implementation 'com.umeng.umsdk:share-core:7.3.7' |
| | | implementation 'com.umeng.umsdk:common:9.8.9'//必选 |
| | | implementation 'com.umeng.umsdk:asms:1.8.7.2' //必选 |
| | | //微信 |
| | | implementation 'com.umeng.umsdk:share-wx:7.3.7' |
| | | } |
| | |
| | | -keep class cn.jiguang.** { *; } |
| | | -dontwarn com.google.** |
| | | -keep class com.google.gson.** {*;} |
| | | -keep class com.google.protobuf.** {*;} |
| | | -keep class com.google.protobuf.** {*;} |
| | | #极光 |
| | | #友盟go |
| | | -keep class com.umeng.** { *; } |
| | | -keep class com.uc.** { *; } |
| | | -keep class com.efs.** { *; } |
| | | -keepclassmembers class *{ |
| | | public<init>(org.json.JSONObject); |
| | | } |
| | | -keepclassmembers enum *{ |
| | | publicstatic**[] values(); |
| | | publicstatic** valueOf(java.lang.String); |
| | | } |
| | | -keep public class com.driver.igotrip.R$*{*;} |
| | | #友盟 |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:tools="http://schemas.android.com/tools" |
| | | package="com.driver.igotrip"> |
| | | xmlns:tools="http://schemas.android.com/tools"> |
| | | |
| | | <queries> |
| | | <package android:name="com.tencent.mm" /> |
| | |
| | | android:name="com.amap.api.v2.apikey" |
| | | android:value="c6cd19f3169a94cccfae5f7161b3ca5f" /> |
| | | |
| | | <activity |
| | | android:name="com.tencent.connect.common.AssistActivity" |
| | | android:configChanges="orientation|keyboardHidden|screenSize" |
| | | android:theme="@android:style/Theme.Translucent.NoTitleBar" /> |
| | | <activity |
| | | android:name=".wxapi.WXEntryActivity" |
| | | android:configChanges="keyboardHidden|orientation|screenSize" |
| | |
| | | |
| | | private void setTouMing() { |
| | | UltimateBar.Companion.with(this) |
| | | .statusDrawable2(getResources().getDrawable(R.drawable.bg_lucency)) // Android 6.0 以下状态栏灰色模式时状态栏颜色 |
| | | .statusDrawable2(getResources().getDrawable(cn.sinata.xldutils.R.drawable.bg_lucency)) // Android 6.0 以下状态栏灰色模式时状态栏颜色 |
| | | .applyNavigation(true) // 应用到导航栏,默认 flase |
| | | .navigationDark(false) // 导航栏灰色模式(Android 8.0+),默认 false |
| | | // .navigationDrawable2(getResources().getDrawable(R.drawable.bg_gray)) // Android 8.0 以下导航栏灰色模式时导航栏颜色 |
| | |
| | | |
| | | fun drawLine(context: Context, aMap: GoogleMap, latLngs: List<LatLng?>?): Polyline? { |
| | | val options = PolylineOptions().addAll(latLngs!!).width(20f) |
| | | .color(ContextCompat.getColor(context, R.color.qing)) |
| | | .color(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.qing)) |
| | | return aMap.addPolyline(options) |
| | | } |
| | | |
| | |
| | | dialog.dismiss() |
| | | } |
| | | view.find<View>(R.id.tv_yx).clickDelay { |
| | | view.find<TextView>(R.id.tv_yx).textColor(this, R.color.white) |
| | | view.find<TextView>(R.id.tv_yx).textColor(this, cn.sinata.xldutils.R.color.white) |
| | | view.find<TextView>(R.id.tv_yh).textColor(this, R.color.blue_2) |
| | | view.find<TextView>(R.id.tv_yx).setBackgroundResource(R.drawable.bg_login_top_left) |
| | | view.find<TextView>(R.id.tv_yh).setBackgroundResource(R.drawable.bg_logion_top_right) |
| | |
| | | } |
| | | view.find<View>(R.id.tv_yh).clickDelay { |
| | | view.find<TextView>(R.id.tv_yx).textColor(this, R.color.blue_2) |
| | | view.find<TextView>(R.id.tv_yh).textColor(this, R.color.white) |
| | | view.find<TextView>(R.id.tv_yh).textColor(this, cn.sinata.xldutils.R.color.white) |
| | | view.find<TextView>(R.id.tv_yx).setBackgroundResource(R.drawable.bg_logion_top_left) |
| | | view.find<TextView>(R.id.tv_yh).setBackgroundResource(R.drawable.bg_login_top_left_select) |
| | | callyh { |
| | |
| | | import com.driver.igotrip.ui.DialogUtil |
| | | import com.driver.igotrip.ui.GetImgActivity |
| | | import com.driver.igotrip.utils.BitmapUtil |
| | | import com.driver.igotrip.utils.OSSUtil |
| | | import com.tbruyelle.rxpermissions2.RxPermissions |
| | | import com.ypx.imagepicker.ImagePicker |
| | | import com.ypx.imagepicker.bean.MimeType |
| | | import com.ypx.imagepicker.bean.SelectMode |
| | | import com.ypx.imagepicker.builder.MultiPickerBuilder |
| | | import org.jetbrains.anko.find |
| | | import org.jetbrains.anko.toast |
| | | import java.io.* |
| | |
| | | .setCancelText(context.getString(R.string.取消)) |
| | | .setSubmitText(context.getString(R.string.确定)) |
| | | .setCancelColor(ContextCompat.getColor(context, R.color.black)) |
| | | .setDividerColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setDividerColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .setSubmitColor(ContextCompat.getColor(context, R.color.blue_2)) |
| | | .setBgColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setTitleBgColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .setTitleBgColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .build<T>(1) |
| | | pickerView.setPicker(list) |
| | | pickerView.show() |
| | |
| | | .setCancelText(context.getString(R.string.取消)) |
| | | .setSubmitText(context.getString(R.string.确定)) |
| | | .setCancelColor(ContextCompat.getColor(context, R.color.black)) |
| | | .setDividerColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setDividerColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .setSubmitColor(ContextCompat.getColor(context, R.color.blue_2)) |
| | | .setBgColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setTitleBgColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .setTitleBgColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .build<T>(1) |
| | | pickerView.setPicker(list) |
| | | pickerView.show() |
| | |
| | | val pickerView: OptionsPickerView<T> = OptionsPickerBuilder(context, lisener) |
| | | .setTitleText("") |
| | | .setCancelColor(ContextCompat.getColor(context, R.color.black)) |
| | | .setDividerColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setDividerColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .setSubmitColor(ContextCompat.getColor(context, R.color.blue_2)) |
| | | .setBgColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setTitleBgColor(ContextCompat.getColor(context, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .setTitleBgColor(ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white)) |
| | | .build<T>(1) |
| | | pickerView.setNPicker(list,listTwo) |
| | | pickerView.show() |
| | |
| | | it.itemView.find<TextView>(R.id.tv_time).text = item.orderTime |
| | | it.itemView.find<TextView>(R.id.tv_money).text = "FCFA "+item.orderMoney |
| | | it.itemView.find<TextView>(R.id.tv_balance).text = "FCFA "+item.payMoney |
| | | it.itemView.find<View>(R.id.ll_root).backgroundColorResource = if (holder.adapterPosition%2 == 1) R.color.f6 else R.color.white |
| | | it.itemView.find<View>(R.id.ll_root).backgroundColorResource = if (holder.adapterPosition%2 == 1) R.color.f6 else cn.sinata.xldutils.R.color.white |
| | | } |
| | | } |
| | | } |
| | |
| | | val tv_content = it.itemView.find<TextView>(R.id.tv_content) |
| | | |
| | | it.itemView.find<View>(R.id.ll_root).backgroundColorResource = |
| | | if (holder.adapterPosition % 2 == 1) R.color.f6 else R.color.white |
| | | if (holder.adapterPosition % 2 == 1) R.color.f6 else cn.sinata.xldutils.R.color.white |
| | | when (type) { |
| | | 0 -> tv_content.text = item.createTime |
| | | 1 -> tv_content.text = item.price |
| | |
| | | PolylineOptions() |
| | | .addAll(points) |
| | | .width(10f) // 路线宽度 |
| | | .color(resources.getColor(R.color.blue)) // 路线颜色 |
| | | .color(resources.getColor(cn.sinata.xldutils.R.color.blue)) // 路线颜色 |
| | | .jointType(JointType.ROUND) // 路线转角圆角 |
| | | ) |
| | | } |
| | |
| | | |
| | | override fun onCreate(savedInstanceState: Bundle?) { |
| | | super.onCreate(savedInstanceState) |
| | | setStyle(STYLE_NO_FRAME, R.style.Dialog) |
| | | setStyle(STYLE_NO_FRAME, cn.sinata.xldutils.R.style.Dialog) |
| | | } |
| | | |
| | | override fun onActivityCreated(savedInstanceState: Bundle?) { |
| | |
| | | function(date) |
| | | }) |
| | | .setTitleText("") |
| | | .setBgColor(ContextCompat.getColor(this, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(this, cn.sinata.xldutils.R.color.white)) |
| | | .setCancelColor(ContextCompat.getColor(this, R.color.black_333333)) |
| | | .setSubmitColor(ContextCompat.getColor(this, R.color.blue_2)) |
| | | .setRangDate(startCalendar, endCalendar) |
| | |
| | | function(date) |
| | | }) |
| | | .setTitleText("") |
| | | .setBgColor(ContextCompat.getColor(this, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(this, cn.sinata.xldutils.R.color.white)) |
| | | .setCancelColor(ContextCompat.getColor(this, R.color.black_333333)) |
| | | .setSubmitColor(ContextCompat.getColor(this, R.color.blue_2)) |
| | | .setRangDate(startCalendar, endCalendar) |
| | |
| | | tv_select_driver_time.text = DateUtil.getTime(DateUtil.TYPE1, date.time) |
| | | }) |
| | | .setTitleText("") |
| | | .setBgColor(ContextCompat.getColor(this, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(this, cn.sinata.xldutils.R.color.white)) |
| | | .setCancelColor(ContextCompat.getColor(this, R.color.black_333333)) |
| | | .setSubmitColor(ContextCompat.getColor(this, R.color.main_yellow)) |
| | | .setRangDate(startCalendar, endCalendar) |
| | |
| | | import cn.sinata.xldutils.utils.getFormatTwo |
| | | import com.driver.igotrip.R |
| | | import com.driver.igotrip.base.BaseEvent |
| | | import com.driver.igotrip.base.BaseEvent.REFREASH_ORDERLIST |
| | | import com.driver.igotrip.base.MyApplication |
| | | import com.driver.igotrip.base.MyBaseActivity |
| | | import com.driver.igotrip.bean.UserBean |
| | |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.find |
| | | import org.jetbrains.anko.startActivity |
| | | import org.jetbrains.anko.toast |
| | | import java.net.URL |
| | | import java.security.MessageDigest |
| | | import java.security.NoSuchAlgorithmException |
| | |
| | | try { |
| | | val info: PackageInfo = |
| | | packageManager.getPackageInfo("com.driver.igotrip", PackageManager.GET_SIGNATURES) |
| | | for (signature in info.signatures) { |
| | | for (signature in info.signatures ?: arrayOf()) { |
| | | val md: MessageDigest = MessageDigest.getInstance("SHA") |
| | | md.update(signature.toByteArray()) |
| | | Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)) |
| | |
| | | showHeader(false) |
| | | val sb = getString(R.string.balance_pay) |
| | | val s1 = sb +"\n" +getString(R.string.balance_pay_description) |
| | | rb_balance.text = SpanBuilder.content(s1).sizeSpan(sb.length,s1.length,12).colorSpan(this,sb.length,s1.length,R.color.textColor66).build() |
| | | rb_balance.text = SpanBuilder.content(s1).sizeSpan(sb.length,s1.length,12).colorSpan(this,sb.length,s1.length,cn.sinata.xldutils.R.color.textColor66).build() |
| | | val so = getString(R.string.online_pay) |
| | | val s2 = so +"\n" + getString(R.string.online_pay_description) |
| | | rb_online.text = SpanBuilder.content(s2).sizeSpan(so.length,s2.length,12).colorSpan(this,so.length,s2.length,R.color.textColor66).build() |
| | | rb_online.text = SpanBuilder.content(s2).sizeSpan(so.length,s2.length,12).colorSpan(this,so.length,s2.length,cn.sinata.xldutils.R.color.textColor66).build() |
| | | val sp = getString(R.string.phone_pay) |
| | | val s3 = sp +"\n" + getString(R.string.phone_pay_description) |
| | | rb_phone.text = SpanBuilder.content(s3).sizeSpan(sp.length,s3.length,12).colorSpan(this,sp.length,s3.length,R.color.textColor66).build() |
| | | rb_phone.text = SpanBuilder.content(s3).sizeSpan(sp.length,s3.length,12).colorSpan(this,sp.length,s3.length,cn.sinata.xldutils.R.color.textColor66).build() |
| | | rv_list.layoutManager = LinearLayoutManager(this) |
| | | rv_list.adapter = adapter |
| | | getData() |
| | |
| | | tv_select_day.text = DateUtil.getTime(DateUtil.TYPE1, date.time) |
| | | } |
| | | .setTitleText("") |
| | | .setBgColor(ContextCompat.getColor(this, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(this, cn.sinata.xldutils.R.color.white)) |
| | | .setCancelColor(ContextCompat.getColor(this, R.color.black_333333)) |
| | | .setSubmitColor(ContextCompat.getColor(this, R.color.blue_2)) |
| | | .setLabel( |
| | |
| | | et_collection_code.text = DateUtil.getTime(DateUtil.TYPE1, date.time) |
| | | } |
| | | .setTitleText("") |
| | | .setBgColor(ContextCompat.getColor(this, R.color.white)) |
| | | .setBgColor(ContextCompat.getColor(this, cn.sinata.xldutils.R.color.white)) |
| | | .setCancelColor(ContextCompat.getColor(this, R.color.black_333333)) |
| | | .setSubmitColor(ContextCompat.getColor(this, R.color.blue_2)) |
| | | .setLabel( |
| | |
| | | context.startActivity(intent!!) |
| | | } |
| | | |
| | | fun Activity.getVersionName(): String { |
| | | fun Activity.getVersionName(): String? { |
| | | return try { |
| | | val manager = this.packageManager |
| | | val info = manager.getPackageInfo(this.packageName, 0) |
| | |
| | | */ |
| | | public static RequestOptions defaultCircleHead = new RequestOptions() |
| | | .circleCrop() |
| | | .error(R.mipmap.default_head) |
| | | .placeholder(R.mipmap.default_head) |
| | | .error(cn.sinata.xldutils.R.mipmap.default_head) |
| | | .placeholder(cn.sinata.xldutils.R.mipmap.default_head) |
| | | .apply(RequestOptions.circleCropTransform()) |
| | | .diskCacheStrategy(DiskCacheStrategy.RESOURCE); |
| | | |
| | |
| | | * |
| | | */ |
| | | public static RequestOptions publicOption = new RequestOptions() |
| | | .error(R.color.white) |
| | | .placeholder(R.color.white) |
| | | .error(cn.sinata.xldutils.R.color.white) |
| | | .placeholder(cn.sinata.xldutils.R.color.white) |
| | | .diskCacheStrategy(DiskCacheStrategy.RESOURCE); |
| | | |
| | | /*** |
| | |
| | | paint.isAntiAlias = true |
| | | paint.style = Paint.Style.FILL |
| | | paint.textSize = dip(17).toFloat() |
| | | paint.color = ContextCompat.getColor(context, R.color.white) |
| | | paint.color = ContextCompat.getColor(context, cn.sinata.xldutils.R.color.white) |
| | | bmp = BitmapFactory.decodeResource(context.resources, R.mipmap.slide) |
| | | } |
| | | |
| | |
| | | // Top-level build file where you can add configuration options common to all sub-projects/modules. |
| | | |
| | | buildscript { |
| | | ext.kotlin_version = '1.3.61' |
| | | repositories { |
| | | maven { url 'https://repo1.maven.org/maven2/' } |
| | | gradlePluginPortal() |
| | | // 阿里云镜像(推荐) |
| | | maven { url 'https://maven.aliyun.com/repository/jcenter' } |
| | | maven { url 'https://maven.aliyun.com/repository/google' } |
| | | maven { url 'https://maven.aliyun.com/repository/public' } |
| | | maven { url 'https://maven.aliyun.com/repository/jcenter' } // JCenter 虽然关闭,但可以尝试使用其缓存镜像 |
| | | gradlePluginPortal() |
| | | maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } |
| | | //jitpack |
| | | maven { url "https://jitpack.io" } |
| | | // 腾讯云镜像 |
| | | maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' } |
| | | google() |
| | | jcenter() |
| | | mavenCentral() |
| | | maven { url 'https://jitpack.io' } |
| | | maven { |
| | | url = uri("https://storage.googleapis.com/r8-releases/raw") |
| | | } |
| | | } |
| | | dependencies { |
| | | classpath 'com.android.tools.build:gradle:7.4.1' |
| | | classpath 'com.android.tools:r8:8.0.46' |
| | | classpath 'com.android.tools.build:gradle:8.6.0' |
| | | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0" |
| | | classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" |
| | | // NOTE: Do not place your application dependencies here; they belong |
| | |
| | | |
| | | allprojects { |
| | | repositories { |
| | | maven { url 'https://repo1.maven.org/maven2/' } |
| | | gradlePluginPortal() |
| | | // 阿里云镜像(推荐) |
| | | maven { url 'https://maven.aliyun.com/repository/jcenter' } |
| | | maven { url 'https://maven.aliyun.com/repository/google' } |
| | | maven { url 'https://maven.aliyun.com/repository/public' } |
| | | maven { url 'https://maven.aliyun.com/repository/jcenter' } // JCenter 虽然关闭,但可以尝试使用其缓存镜像 |
| | | maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } |
| | | //jitpack |
| | | maven { url "https://jitpack.io" } |
| | | // 腾讯云镜像 |
| | | maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' } |
| | | google() |
| | | jcenter() |
| | | mavenCentral() |
| | |
| | | android { |
| | | compileSdkVersion 28 |
| | | buildToolsVersion "29.0.3" |
| | | namespace "com.lzf.easyfloat" |
| | | |
| | | defaultConfig { |
| | | minSdkVersion 23 |
| | |
| | | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| | | } |
| | | } |
| | | |
| | | compileOptions { |
| | | sourceCompatibility JavaVersion.VERSION_1_8 |
| | | targetCompatibility JavaVersion.VERSION_1_8 |
| | | } |
| | | |
| | | kotlinOptions { |
| | | jvmTarget = "1.8" // 与上面保持一致 |
| | | } |
| | | |
| | | buildFeatures { |
| | | buildConfig = true // 显式启用 BuildConfig |
| | | androidResources = true |
| | | } |
| | | } |
| | | |
| | | dependencies { |
| | |
| | | android.enableJetifier=true |
| | | # Kotlin code style for this project: "official" or "obsolete": |
| | | kotlin.code.style=official |
| | | org.gradle.jvmargs=-Xmx2048m |
| | | org.gradle.jvmargs=-Xmx4096m |
| | |
| | | zipStoreBase=GRADLE_USER_HOME |
| | | zipStorePath=wrapper/dists |
| | | #distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip |
| | | distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-7.5.1-all.zip |
| | | distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.7-all.zip |
| | | #distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip |
| | | |
| | |
| | | apply plugin: 'com.android.library' |
| | | |
| | | android { |
| | | compileSdkVersion 34 |
| | | |
| | | compileSdkVersion 35 |
| | | namespace "cn.sinata.rxnetty" |
| | | |
| | | defaultConfig { |
| | | minSdkVersion 19 |
| | | targetSdkVersion 34 |
| | | minSdkVersion 23 |
| | | targetSdkVersion 35 |
| | | |
| | | } |
| | | |
| | |
| | | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| | | } |
| | | } |
| | | |
| | | buildFeatures { |
| | | buildConfig = true // 显式启用 BuildConfig |
| | | androidResources = true |
| | | } |
| | | } |
| | | |
| | | dependencies { |
| | |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| | | package="cn.sinata.rxnetty" > |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android"> |
| | | |
| | | <uses-permission android:name="android.permission.INTERNET"/> |
| | | <!--允许读取网络状态--> |
| | |
| | | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| | | |
| | | <!-- 强制要求的前台服务类型权限 --> |
| | | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> |
| | | <uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" /> |
| | | |
| | | <application> |
| | | <receiver android:name=".netStatus.NetStateReceiver"/> |
| | | <service android:name="cn.sinata.rxnetty.CoreService" |
| | | android:foregroundServiceType="dataSync" |
| | | android:foregroundServiceType="remoteMessaging" |
| | | android:exported="false" |
| | | android:permission="android.permission.FOREGROUND_SERVICE"/> |
| | | <service android:name="cn.sinata.rxnetty.NJobService" |
| | |
| | | NetStateReceiver.registerObserver(mNetChangeObserver); |
| | | if (Config.isStartForeground) { |
| | | if (Build.VERSION.SDK_INT >= 34) { |
| | | startForeground(Config.NOTIFICATION_ID,getNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC); |
| | | startForeground(Config.NOTIFICATION_ID,getNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING); |
| | | } else { |
| | | startForeground(Config.NOTIFICATION_ID,getNotification()); |
| | | } |
| | |
| | | |
| | | android { |
| | | compileSdkVersion 29 |
| | | namespace "cn.sinata.xldutils" |
| | | |
| | | defaultConfig { |
| | | minSdkVersion 21 |
| | |
| | | } |
| | | buildTypes { |
| | | release { |
| | | minifyEnabled true |
| | | minifyEnabled false |
| | | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| | | } |
| | | debug { |
| | |
| | | jniLibs.srcDirs = ['libs'] |
| | | } |
| | | } |
| | | splits { |
| | | abi { |
| | | enable true |
| | | reset() |
| | | include 'armeabi' |
| | | universalApk false |
| | | } |
| | | buildFeatures { |
| | | buildConfig = true // 显式启用 BuildConfig |
| | | androidResources = true |
| | | } |
| | | // splits { |
| | | // abi { |
| | | // enable true |
| | | // reset() |
| | | // include 'armeabi' |
| | | // universalApk false |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | implementation "androidx.core:core-ktx:1.2.0" |
| | | implementation 'com.google.android.material:material:1.1.0' |
| | | //fresco |
| | | api 'com.facebook.fresco:fresco:1.13.0' |
| | | api 'com.facebook.fresco:fresco:3.6.0' |
| | | api 'com.squareup.okhttp3:okhttp:3.12.0' |
| | | //http日志拦截器 |
| | | api 'com.squareup.okhttp3:logging-interceptor:4.9.1' |
| | | implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0' |
| | | //retrofit |
| | | api "com.squareup.retrofit2:retrofit:$retrofit_version" |
| | |
| | | |
| | | api 'com.google.code.gson:gson:2.8.5' |
| | | api 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar' |
| | | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" |
| | | implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.0" |
| | | api 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' |
| | | api 'com.trello.rxlifecycle3:rxlifecycle-android:3.1.0' |
| | | api 'com.trello.rxlifecycle3:rxlifecycle-components:3.1.0' |
| | |
| | | } |
| | | |
| | | |
| | | # Gson |
| | | -keepattributes Signature-keepattributes *Annotation* |
| | | # Gson specific classes |
| | | -keep class sun.misc.Unsafe { *; } |
| | | -keep class com.google.gson.stream.** { *; } |
| | | #-keep class com.google.gson.stream.** { *; } |
| | | # Application classes that will be serialized/deserialized over Gson |
| | | # 正式项目需添加对应的java bean目录 |
| | | -keep class cn.sinata.xldutils.bean.** { *; } |