Skip to content

Commit

Permalink
日常提交:2022-10-09。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangpf committed Oct 9, 2022
1 parent 9c3a55a commit fe320ab
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.
4 changes: 3 additions & 1 deletion Quick/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ dependencies {
//列表
implementation deps.androidx.recyclerview
//Glide
implementation 'com.github.bumptech.glide:glide:4.13.2'
implementation 'com.github.bumptech.glide:glide:4.14.1'

implementation 'com.google.code.gson:gson:2.9.0'

if (IS_REMOTE.toBoolean()) {
api deps.quickbind.bind
api deps.quickbind.util
api deps.quickbind.network
} else {
api project(":QuickBind")
api project(":QuickUtil")
api project(":QuickNetwork")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import java.util.ArrayList
// }
//}

fun <T : Activity?> Activity.startActivity(activityCls: Class<T>) {
fun <T : Activity> Activity.startActivity(activityCls: Class<T>) {
startActivity(activityCls, data = null)
}

fun <T : Activity?> Activity.startActivity(
fun <T : Activity> Activity.startActivity(
activityCls: Class<T>,
data: Map<String, Any?>?
) {
Expand All @@ -51,7 +51,7 @@ fun <T : Activity?> Activity.startActivity(
for (key in keys) {
val value = data[key]
if (value is ArrayList<*> && value.isNotEmpty() && value[0] is Parcelable) {
intent.putParcelableArrayListExtra(key, value as ArrayList<out Parcelable?>?)
intent.putParcelableArrayListExtra(key, value as ArrayList<out Parcelable>)
} else if (value is Parcelable) {
intent.putExtra(key, value)
} else if (value is Serializable) {
Expand Down
6 changes: 4 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ dependencies {

if (IS_REMOTE.toBoolean())
implementation deps.quickbind.base
else
else {
implementation project(":Quick")
implementation project(":R2Test")
}


// implementation project(":R2Test")
}
6 changes: 4 additions & 2 deletions app/src/main/java/com/wpf/app/quick/demo/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.wpf.app.quick.demo

import android.annotation.SuppressLint
import android.app.Activity
import android.view.View
import android.widget.TextView
import com.wpf.app.quick.activity.QuickViewModelBindingActivity
Expand All @@ -11,7 +12,6 @@ import com.wpf.app.quick.demo.model.TestModel
import com.wpf.app.quick.demo.viewmodel.MainViewModel
import com.wpf.app.quickbind.annotations.BindSp2View
import com.wpf.app.quickutil.startActivity
//import com.wpf.app.r2test.R2TestActivity

/**
* Created by 王朋飞 on 2022/6/13.
Expand Down Expand Up @@ -49,7 +49,9 @@ class MainActivity : QuickViewModelBindingActivity<MainViewModel, ActivityMainBi
}

fun gotoR2Test(view: View?) {
// startActivity(activityCls = R2TestActivity::class.java)
try {
startActivity(activityCls = Class.forName("com.wpf.app.r2test.R2TestActivity") as Class<Activity>)
} catch (ignore: Exception) { }
}

fun gotoGlide(view: View?) {
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ buildscript {
'runtime' : "com.wpf.app.quick:Quick-runtime:${release}",
'compiler' : "com.wpf.app.quick:Quick-compiler:${release}",
'util' : "com.wpf.app.quick:QuickUtil:${release}",
'network' : "com.wpf.app.quick:QuickNetwork:${release}",
'plugin' : "com.github.walgr.Quick:Quick-gradle-plugin:0.3.0"
],
gradlePlugin : "com.android.tools.build:gradle:4.2.2",
Expand Down Expand Up @@ -60,7 +61,9 @@ buildscript {
}

dependencies {
// classpath deps.quickbind.plugin
if (!IS_REMOTE.toBoolean()) {
classpath deps.quickbind.plugin
}
}
}

Expand Down
4 changes: 1 addition & 3 deletions gradle-mvn-push-aar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ afterEvaluate {
artifactId POM_ARTIFACT_ID
version VERSION_NAME

afterEvaluate {
from components.release
}
from components.release
// 运行任务,把源码打进去
// artifact sourceJar
}
Expand Down
4 changes: 1 addition & 3 deletions gradle-mvn-push-jar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ afterEvaluate {
groupId GROUP
artifactId POM_ARTIFACT_ID
version VERSION_NAME
afterEvaluate {
from components.java
}
from components.java
// 运行任务,把源码打进去
// artifact sourceJar
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android.nonTransitiveRClass=true

IS_REMOTE=true
GROUP=com.wpf.app.quick
VERSION_NAME=0.4.0
VERSION_NAME=0.4.1

POM_DESCRIPTION=Quick Android.

Expand Down
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ dependencyResolutionManagement {

rootProject.name = "Quick"
include ':app'
//include ':R2Test'
if (!IS_REMOTE.toBoolean()) {
include ':R2Test'
}
include ':Quick'
include ':QuickBind'
include ':Quick-annotations'
Expand Down

0 comments on commit fe320ab

Please sign in to comment.