skedgo / DateTimeRangePicker

A date time range picker for android written in Kotlin
MIT License
506 stars 76 forks source link

Potential data-binding version conflict #10

Closed thuutin closed 7 years ago

thuutin commented 7 years ago

:DateTimeRangePicker2:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception.

I get this error when building a project using com.android.tools.build:gradle:2.3.0-beta1, this library is using a different version com.android.tools.build:gradle:2.2.3.

thuytrinh commented 7 years ago

If you link to the library via JitPack, would it still throw that error?

thuutin commented 7 years ago

Yes. it will. we could instruct the user of this library to include

ext.androidPluginVersion = '2.2.3'
ext.kotlinVersion = '1.0.5-3'
ext.supportLibraryVersion = '25.1.0'

to ensure the same version of databinding

thuytrinh commented 7 years ago

Have you tried resolutionStrategy? Would it work? For example, on top-level build file:

allprojects {
  repositories {
    jcenter()
    maven { url "https://jitpack.io" }

  // A workaround for https://code.google.com/p/android/issues/detail?id=72430
  // and http://g.co/androidstudio/app-test-app-conflict.
  configurations.all {
    resolutionStrategy {
      force "com.android.support:design:$supportLibraryVersion"
      force "com.android.support:appcompat-v7:$supportLibraryVersion"
      force "com.android.support:support-v4:$supportLibraryVersion"
      force "com.android.support:support-annotations:$supportLibraryVersion"
    }
  }
}
thuytrinh commented 7 years ago

Close this because this seems to be app issue not library issue.