Skip to content

Commit

Permalink
Updated Kotlin version and build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
AppacheCodesandra committed Dec 5, 2017
1 parent 02549e8 commit fe0468b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions powerbottomsheet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ androidExtensions {
}

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 27
versionCode 2
versionName "1.7"
versionName "1.7.1"
}
buildTypes {
release {
Expand All @@ -40,8 +40,8 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'

compile 'com.github.kylealanr:GestureDetectors:1.1'
compile 'com.github.InkApplications:android-logger:4.1.0'
Expand All @@ -65,7 +65,7 @@ publishing {
maven(MavenPublication) {
groupId 'com.github.u1f4f1'
artifactId 'PowerBottomSheet'
version '1.7'
version '1.7.1'
artifact("$buildDir/outputs/aar/powerbottomsheet-release.aar")
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ abstract class BottomSheet : NestedScrollView {
private var stateCallbacks: MutableSet<AnchorPointBottomSheetBehavior.BottomSheetStateCallback> = mutableSetOf()
private var slideCallbacks: MutableSet<AnchorPointBottomSheetBehavior.BottomSheetSlideCallback> = mutableSetOf()

constructor(context: Context?) : super(context)
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
constructor(context: Context) : super(context)
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)

init {
info("Created BottomSheet ${this.humanReadableToString()}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ open class AnchorPointBottomSheetBehavior<V : View> : CoordinatorLayout.Behavior
return viewRef != null && viewRef!!.get() === child
}

override fun onViewPositionChanged(changedView: View?, left: Int, top: Int, dx: Int, dy: Int) {
override fun onViewPositionChanged(changedView: View, left: Int, top: Int, dx: Int, dy: Int) {
dispatchOnSlide(top)
}

Expand Down Expand Up @@ -195,13 +195,13 @@ open class AnchorPointBottomSheetBehavior<V : View> : CoordinatorLayout.Behavior
}
}

override fun clampViewPositionVertical(child: View?, top: Int, dy: Int): Int = constrain(top, minOffset, if (isHideable) parentHeight else maxOffset)
override fun clampViewPositionVertical(child: View, top: Int, dy: Int): Int = constrain(top, minOffset, if (isHideable) parentHeight else maxOffset)

internal fun constrain(amount: Int, low: Int, high: Int): Int = if (amount < low) low else if (amount > high) high else amount

override fun clampViewPositionHorizontal(child: View?, left: Int, dx: Int): Int = child!!.left
override fun clampViewPositionHorizontal(child: View, left: Int, dx: Int): Int = child.left

override fun getViewVerticalDragRange(child: View?): Int {
override fun getViewVerticalDragRange(child: View): Int {
return if (isHideable) {
parentHeight - minOffset
} else {
Expand Down
10 changes: 5 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"

defaultConfig {
applicationId "u1f4f1.com.sample"
minSdkVersion 21
targetSdkVersion 26
targetSdkVersion 27
versionCode 2
versionName "1.1"
multiDexEnabled true
Expand All @@ -32,8 +32,8 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'

compile 'io.reactivex.rxjava2:rxjava:2.1.3'
Expand Down

0 comments on commit fe0468b

Please sign in to comment.