Skip to content

Commit

Permalink
fix transitive dependency to facebook and camera module
Browse files Browse the repository at this point in the history
  • Loading branch information
mario222k committed Dec 3, 2019
1 parent e8cc823 commit e7de02b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 21 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ What PickPic will not handle are animated pictures and videos.
pickpic_version = "<tag>"
dependencies {
implementation "com.lovoo.android:pickcore:$pickpic_version"
implementation "com.lovoo.android:pickui:$pickpic_version"
implementation "com.lovoo.android:pickcam:$pickpic_version"
implementation "com.lovoo.android:pickfacebook:$pickpic_version"
implementation "com.lovoo.android:pickapp:$pickpic_version"
implementation ("com.lovoo.android:pickapp:$pickpic_version") {
exclude group: 'com.lovoo.android', module: 'pickfacebook'
exclude group: 'com.lovoo.android', module: 'pickcam'
}
}
```

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ buildscript {
ext.orchestrator_version = "1.2.0"
ext.androidX_test_version = "1.2.0"

ext.pickpic_version = "1.0.0"
ext.pickpic_version = "1.0.1"

ext.target_version = 28
ext.min_version = 18

def version = System.getenv("VERSION")
def code = System.getenv("VERSION_CODE")
ext.version_name = version == null ? "${System.currentTimeMillis()}-SNAPSHOT" : version
ext.version_code = code == null ? 1 : code.toInteger()
ext.version_name = version == null ? "1.0.1" : version
ext.version_code = code == null ? 2 : code.toInteger()

repositories {
google()
Expand Down
5 changes: 3 additions & 2 deletions pickapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ dependencies {

kapt "androidx.lifecycle:lifecycle-compiler:$arch_version"

api project(path: ':pickfacebook')
api project(path: ':pickcam')
implementation project(path: ':pickfacebook')
implementation project(path: ':pickcam')
api project(path: ':pickui')
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import com.lovoo.android.pickcam.view.PickPicCaptureFragment
import com.lovoo.android.pickcore.Constants
import com.lovoo.android.pickcore.PickPicProvider
import com.lovoo.android.pickcore.contract.CameraEngine
import com.lovoo.android.pickcore.contract.CaptureCallback
import com.lovoo.android.pickcore.contract.SelectionHolder
import com.lovoo.android.pickcore.contract.ToggleCallback
import com.lovoo.android.pickcore.engine.DisabledCameraEngine
Expand All @@ -37,7 +38,7 @@ import java.util.*
/**
* Ready to use PickPic implementation. Configurable with [PickPicConfig].
*/
class PickPicActivity : AppCompatActivity(), SelectionHolder, CameraEngine, PickPicCaptureFragment.CaptureCallback {
class PickPicActivity : AppCompatActivity(), SelectionHolder, CameraEngine, CaptureCallback {

private lateinit var config: PickPicConfig
private lateinit var picker: Picker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.fragment.app.FragmentManager
import com.lovoo.android.pickcam.R
import com.lovoo.android.pickcam.worker.CaptureResultWorker
import com.lovoo.android.pickcore.contract.CameraDestination
import com.lovoo.android.pickcore.contract.CaptureCallback
import com.lovoo.android.pickcore.destination.PrivateDirectory
import com.lovoo.android.pickcore.destination.PublicDirectory
import com.lovoo.android.pickcore.loader.CameraLoader
Expand Down Expand Up @@ -144,16 +145,6 @@ class PickPicCaptureFragment : DialogFragment() {
}
}

/**
* The interface that the calling UI should implement to receive the captured file.
*/
interface CaptureCallback {
/**
* @param uri the path to the captured file or null
*/
fun onCapture(uri: Uri?)
}

companion object {
private const val CAMERA_REQUEST_CODE = 2734
private const val PERMISSION_REQUEST_CODE = 2735
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.lovoo.android.pickcore.contract

import android.net.Uri


/**
* The interface that the calling UI should implement to receive the captured file.
*/
interface CaptureCallback {
/**
* @param uri the path to the captured file or null
*/
fun onCapture(uri: Uri?)
}

0 comments on commit e7de02b

Please sign in to comment.