Skip to content

Commit

Permalink
Update dependencies and add conscript
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed May 17, 2024
1 parent 6639b4f commit 5a84095
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 46 deletions.
1 change: 1 addition & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ concurrency:
jobs:
wearos:
if: ${{ github.repository == 'HiddenRamblings/TagMo' }}
continue-on-error: true
runs-on: ubuntu-latest

steps:
Expand Down
24 changes: 13 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,24 +118,25 @@ android {
}

dependencies {
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'androidx.activity:activity-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation "androidx.browser:browser:1.7.0"
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.browser:browser:1.8.0"
def androidx_camera = '1.3.3'
implementation "androidx.camera:camera-core:$androidx_camera"
implementation "androidx.camera:camera-camera2:$androidx_camera"
implementation "androidx.camera:camera-lifecycle:$androidx_camera"
implementation "androidx.camera:camera-view:$androidx_camera"
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation 'androidx.fragment:fragment-ktx:1.7.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.webkit:webkit:1.10.0'
implementation 'androidx.webkit:webkit:1.11.0'
wearosImplementation "androidx.wear:wear:1.3.0"

implementation 'com.android.billingclient:billing:6.1.0'
implementation 'com.android.billingclient:billing:6.2.1'

implementation 'com.github.bumptech.glide:glide:4.16.0'
ksp 'com.github.bumptech.glide:ksp:4.16.0'
Expand All @@ -145,7 +146,7 @@ dependencies {
implementation 'com.google.android.flexbox:flexbox:3.0.0'
// Required for Lollipop Amiibo API download compatibility
implementation 'com.google.android.gms:play-services-basement:18.3.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.android.play:core:1.10.3'
// implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.1.0'
implementation 'com.google.mlkit:barcode-scanning:17.2.0'
Expand All @@ -156,6 +157,7 @@ dependencies {

implementation 'io.github.vicmikhailau:MaskedEditText:4.0.7'

implementation 'org.conscrypt:conscrypt-android:2.5.2'
implementation 'org.lsposed.hiddenapibypass:hiddenapibypass:4.3'

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0'
Expand Down
5 changes: 4 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-keep class com.google.android.material.R$drawable { *; }
-keep class com.google.android.material.R$drawable { *; }

-dontwarn com.android.org.conscrypt.SSLParametersImpl
-dontwarn org.apache.harmony.xnet.provider.jsse.SSLParametersImpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,44 +75,60 @@ class FABulous : FloatingActionButton, OnTouchListener {
return floatArrayOf(newX, newY)
}

private var lastPressed: Long = System.currentTimeMillis()

override fun onTouch(view: View, motionEvent: MotionEvent): Boolean {
val action = motionEvent.action
return if (action == MotionEvent.ACTION_DOWN) {
downRawX = motionEvent.rawX
downRawY = motionEvent.rawY
dX = view.x - downRawX
dY = view.y - downRawY
true // Consumed
} else if (action == MotionEvent.ACTION_MOVE) {
val bounds = getViewCoordinates(view, motionEvent.rawX + dX, motionEvent.rawY + dY)
view.animate()
.x(bounds[0])
.y(bounds[1])
.setDuration(0)
.setListener(object : AnimatorListener{
override fun onAnimationStart(p0: Animator) { }

override fun onAnimationEnd(p0: Animator) {
viewMoveListener?.onActionMove(view.x, view.y)
}

override fun onAnimationCancel(p0: Animator) { }
override fun onAnimationRepeat(p0: Animator) { }
})
.start()
true // Consumed
} else if (action == MotionEvent.ACTION_UP) {
val upRawX = motionEvent.rawX
val upRawY = motionEvent.rawY
val upDX = upRawX - downRawX
val upDY = upRawY - downRawY
if (abs(upDX) < CLICK_DRAG_TOLERANCE && abs(upDY) < CLICK_DRAG_TOLERANCE) { // A click
performClick()
} else { // Drag
return when (action) {
MotionEvent.ACTION_DOWN -> {
downRawX = motionEvent.rawX
downRawY = motionEvent.rawY
dX = view.x - downRawX
dY = view.y - downRawY
true // Consumed
}
MotionEvent.ACTION_MOVE -> {
val bounds = getViewCoordinates(view, motionEvent.rawX + dX, motionEvent.rawY + dY)
view.animate()
.x(bounds[0])
.y(bounds[1])
.setDuration(0)
.setListener(object : AnimatorListener{
override fun onAnimationStart(p0: Animator) { }

override fun onAnimationEnd(p0: Animator) {
viewMoveListener?.onActionMove(view.x, view.y)
}

override fun onAnimationCancel(p0: Animator) { }
override fun onAnimationRepeat(p0: Animator) { }
})
.start()
lastPressed = System.currentTimeMillis()
true // Consumed
}
} else {
super.onTouchEvent(motionEvent)
MotionEvent.ACTION_UP -> {
val upRawX = motionEvent.rawX
val upRawY = motionEvent.rawY
val upDX = upRawX - downRawX
val upDY = upRawY - downRawY
if (abs(upDX) < CLICK_DRAG_TOLERANCE && abs(upDY) < CLICK_DRAG_TOLERANCE) { // A click
val click = if (System.currentTimeMillis() > lastPressed + 750) {
performLongClick()
} else {
performClick()
}
lastPressed = System.currentTimeMillis()
click
} else { // Drag
lastPressed = System.currentTimeMillis()
true // Consumed
}
}
else -> {
lastPressed = System.currentTimeMillis()
super.onTouchEvent(motionEvent)
}
}
}

Expand Down

0 comments on commit 5a84095

Please sign in to comment.