mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Move common gradle config into convention plugins.
This commit is contained in:
@@ -1,39 +1,11 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'signal-library'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'org.signal.imageeditor'
|
||||
|
||||
buildToolsVersion BUILD_TOOL_VERSION
|
||||
compileSdkVersion COMPILE_SDK
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MINIMUM_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JAVA_VERSION
|
||||
targetCompatibility JAVA_VERSION
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
lintChecks project(':lintchecks')
|
||||
|
||||
implementation project(':core-util')
|
||||
|
||||
coreLibraryDesugaring libs.android.tools.desugar
|
||||
|
||||
implementation libs.androidx.core.ktx
|
||||
implementation libs.androidx.annotation
|
||||
implementation libs.androidx.appcompat
|
||||
}
|
||||
@@ -4,9 +4,9 @@ import android.graphics.Color
|
||||
import android.graphics.DashPathEffect
|
||||
import android.graphics.Paint
|
||||
import android.graphics.Path
|
||||
import org.signal.core.util.DimensionUnit
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import org.signal.core.util.DimensionUnit
|
||||
import org.signal.imageeditor.core.Bounds
|
||||
import org.signal.imageeditor.core.Renderer
|
||||
import org.signal.imageeditor.core.RendererContext
|
||||
@@ -15,10 +15,14 @@ class SelectedElementGuideRenderer : Renderer {
|
||||
|
||||
private val allPointsOnScreen = FloatArray(8)
|
||||
private val allPointsInLocalCords = floatArrayOf(
|
||||
Bounds.LEFT, Bounds.TOP,
|
||||
Bounds.RIGHT, Bounds.TOP,
|
||||
Bounds.RIGHT, Bounds.BOTTOM,
|
||||
Bounds.LEFT, Bounds.BOTTOM
|
||||
Bounds.LEFT,
|
||||
Bounds.TOP,
|
||||
Bounds.RIGHT,
|
||||
Bounds.TOP,
|
||||
Bounds.RIGHT,
|
||||
Bounds.BOTTOM,
|
||||
Bounds.LEFT,
|
||||
Bounds.BOTTOM
|
||||
)
|
||||
|
||||
private val circleRadius = DimensionUnit.DP.toPixels(5f)
|
||||
|
||||
@@ -67,7 +67,7 @@ internal class TrashRenderer : InvalidateableRenderer, Renderer, Parcelable {
|
||||
rendererContext.canvas.drawCircle(buttonCenter[0], buttonCenter[1], diameter / 2f, shadePaint)
|
||||
rendererContext.canvas.drawCircle(buttonCenter[0], buttonCenter[1], diameter / 2f, outlinePaint)
|
||||
rendererContext.canvas.translate(bounds.centerX(), bounds.bottom - diameterLarge / 2f - padBottom)
|
||||
rendererContext.canvas.translate(- (trashSize / 2f), - (trashSize / 2f))
|
||||
rendererContext.canvas.translate(-(trashSize / 2f), -(trashSize / 2f))
|
||||
trash.draw(rendererContext.canvas)
|
||||
rendererContext.canvas.restore()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user