-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
599eb89
commit 3a5757c
Showing
10 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
plugins { | ||
id 'com.android.library' | ||
id 'kotlin-android' | ||
} | ||
|
||
ext { | ||
groupId = 'com.github.kirich1409' | ||
artifactId = "viewbindingpropertydelegate-core" | ||
} | ||
|
||
apply from: rootProject.file('publishing.gradle') | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
// For Kotlin projects | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
kotlinOptions.freeCompilerArgs += | ||
['-module-name', "com.github.kirich1409.ViewBindingPropertyDelegate.core"] | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly rootProject.ext.dependencies.viewBinding | ||
implementation rootProject.ext.dependencies.lifecycleCommonJava8 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<manifest package="by.kirich1409.viewbindingdelegate.core" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
vbpd/vbpd-core/src/main/kotlin/by/kirich1409/viewbindingdelegate/internal/core/Utils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package by.kirich1409.viewbindingdelegate.internal.core | ||
|
||
import android.os.Looper | ||
|
||
internal fun checkMainThread() { | ||
check(Looper.getMainLooper() === Looper.myLooper()) { | ||
"The method must be called on the main thread" | ||
} | ||
} | ||
|
||
internal fun checkMainThread(reason: String) { | ||
check(Looper.getMainLooper() === Looper.myLooper()) { | ||
"The method must be called on the main thread. Reason: $reason." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters