sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
105 stars 28 forks source link

com.android.support:appcompat-v7:24.2.1 #33

Closed MarcusWolschon closed 6 years ago

MarcusWolschon commented 6 years ago

The sumup SDK includes com.android.support:appcompat-v7:24.2.1 and thus prevents the applications from including com.android.support:appcompat-v7:27.0.2 without conflicts

MarcusWolschon commented 6 years ago

This means that neither compileSdkVersion nor targetSdkVersion can be higher then 24 (e.g. 27)

vfoixcable commented 6 years ago

Gradle allowed to force the version of a dependency. And the SDK can survive it . Therefore, compileSdkVersion and targetSdkVersion can of course be greater than 24. The code could be for instance in the android node of the build.gradle script:

configurations.all {
        resolutionStrategy {
            force 'com.android.support:appcompat-v7:27.0.2'
            force 'com.android.support:support-v4:27.0.2'
            force 'com.android.support:appcompat-v7:27.0.2'
            force 'com.android.support:cardview-v7:27.0.2'
            force 'com.android.support:design:27.0.2'
        }
    }

Declaring these dependencies in the build.gradle and excluding the support group from the sdk works as well.

MarcusWolschon commented 6 years ago

Forcing a version number is not an acceptable solution.

ghost commented 6 years ago

@MarcusWolschon implementation('com.sumup:merchant-sdk:3.0.0'){ exclude group: 'com.android.support', module: 'appcompat-v7' }

MarcusWolschon commented 6 years ago

actually:

implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support:support-v4:$support_version"
implementation "com.android.support:design:$support_version"
implementation "com.android.support:cardview-v7:$support_version" // for sumup
implementation "com.android.support:support-core-utils:$support_version"
implementation "com.android.support:support-annotations:$support_version"
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
//implementation 'com.sumup:merchant-sdk:3.0.0'
implementation('com.sumup:merchant-sdk:3.0.0'){
    exclude group: 'com.android.support', module: 'appcompat-v7'
    exclude group: 'com.android.support', module: 'support-v4'
    exclude group: 'com.android.support', module: 'design'
    exclude group: 'com.android.support', module: 'cardview-v7'
    exclude group: 'com.android.support', module: 'support-annotations'
}