Skip to content

Commit 2c2cd74

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
# Conflicts: # extensionslib/src/main/java/com/omega_r/libs/extensions/view/ViewExtensions.kt
2 parents 7c69276 + 378aff7 commit 2c2cd74

28 files changed

Lines changed: 665 additions & 111 deletions

.idea/codeStyles/Project.xml

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Add it in your root build.gradle at the end of repositories:
1616
Step 2. Add the dependency
1717

1818
dependencies {
19-
implementation 'com.github.Omega-R:OmegaExtensions:1.0.0'
19+
implementation 'com.github.Omega-R:OmegaExtensions:1.0.4'
2020
}

app/build.gradle

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-android-extensions'
44

55
android {
6-
compileSdkVersion 28
6+
compileSdkVersion 30
77
defaultConfig {
88
applicationId "omega_r.com.extensions.simple"
99
minSdkVersion 14
10-
targetSdkVersion 28
10+
targetSdkVersion 30
1111
versionCode 1
1212
versionName "1.0"
1313
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14+
15+
kotlinOptions.freeCompilerArgs += [
16+
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
17+
"-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi",
18+
"-Xuse-experimental=kotlin.time.ExperimentalTime"]
1419
}
1520
buildTypes {
1621
release {
@@ -22,12 +27,13 @@ android {
2227

2328
dependencies {
2429
implementation fileTree(dir: 'libs', include: ['*.jar'])
30+
implementation project(':extensionslib')
2531
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
2632
implementation "androidx.appcompat:appcompat:$appcompat"
27-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
28-
implementation project(':extensionslib')
33+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
34+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
2935

30-
testImplementation 'junit:junit:4.12'
31-
androidTestImplementation 'androidx.test:runner:1.2.0-alpha03'
32-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha03'
36+
testImplementation 'junit:junit:4.13.1'
37+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
38+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
3339
}

app/src/main/java/omega_r/com/extensions/simple/MainActivity.kt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,50 @@ package omega_r.com.extensions.simple
22

33
import androidx.appcompat.app.AppCompatActivity
44
import android.os.Bundle
5+
import android.util.Log
6+
import com.omega_r.libs.extensions.coroutines.launchDelayed
7+
import com.omega_r.libs.extensions.coroutines.launchWithTicker
8+
import kotlinx.coroutines.CoroutineScope
9+
import kotlinx.coroutines.Dispatchers
10+
import kotlin.time.DurationUnit
11+
import kotlin.time.seconds
512

613
class MainActivity : AppCompatActivity() {
714

815
override fun onCreate(savedInstanceState: Bundle?) {
916
super.onCreate(savedInstanceState)
1017
setContentView(R.layout.activity_main)
18+
19+
CoroutineScope(Dispatchers.Default).apply {
20+
launchDelayed(4900) {
21+
Log.d("MainActivity", "launchDelayed(4900)")
22+
}
23+
launchDelayed(5.seconds) {
24+
Log.d("MainActivity", "launchDelayed(5.seconds)")
25+
}
26+
launchWithTicker(
27+
ticksCount = 10,
28+
tickDurationMillis = 1000,
29+
initialDelayMillis = 5000,
30+
onTick = {
31+
Log.d("MainActivity", "launchWithTicker($it)")
32+
},
33+
onEnd = {
34+
Log.d("MainActivity", "launchWithTicker(end)")
35+
}
36+
)
37+
launchWithTicker(
38+
ticksCount = 10,
39+
tickDuration = 1.seconds,
40+
initialDelay = 15.seconds,
41+
onTick = {
42+
Log.d("MainActivity", "launchWithTicker2($it)")
43+
},
44+
onEnd = {
45+
Log.d("MainActivity", "launchWithTicker2(end)")
46+
}
47+
)
48+
}
1149
}
1250

1351
}

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.3.30'
5-
ext.appcompat = '1.1.0-alpha04'
4+
ext.kotlin_version = '1.4.10'
5+
ext.appcompat = '1.2.0'
66

77
repositories {
88
google()
99
jcenter()
1010

1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:3.3.2'
13+
classpath 'com.android.tools.build:gradle:4.1.1'
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1515
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1616
// NOTE: Do not place your application dependencies here; they belong

extensionslib/build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@ apply plugin: 'kotlin-android'
33
apply plugin: 'com.github.dcendents.android-maven'
44

55
android {
6-
compileSdkVersion 28
6+
compileSdkVersion 30
77

88
defaultConfig {
99
minSdkVersion 14
10-
targetSdkVersion 28
10+
targetSdkVersion 30
1111
versionCode 1
1212
versionName "1.0"
1313

1414
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1515

16+
kotlinOptions.freeCompilerArgs += [
17+
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
18+
"-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi",
19+
"-Xuse-experimental=kotlin.time.ExperimentalTime"]
1620
}
1721

1822
buildTypes {
@@ -21,16 +25,19 @@ android {
2125
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2226
}
2327
}
24-
28+
kotlinOptions {
29+
freeCompilerArgs = ["-Xinline-classes"]
30+
}
2531
}
2632

2733
dependencies {
2834
implementation fileTree(dir: 'libs', include: ['*.jar'])
2935
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3036
implementation "androidx.appcompat:appcompat:$appcompat"
31-
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
37+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
38+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
3239

33-
testImplementation 'junit:junit:4.12'
40+
testImplementation 'junit:junit:4.13.1'
3441
androidTestImplementation 'com.android.support.test:runner:1.0.2'
3542
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
3643
}

0 commit comments

Comments
 (0)