mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-22 16:23:55 +00:00
add android target
This commit is contained in:
parent
bbb4f41723
commit
0376eb7910
57
build.gradle
57
build.gradle
@ -3,11 +3,14 @@ buildscript {
|
|||||||
mavenLocal()
|
mavenLocal()
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
google()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath "com.github.breadmoirai:github-release:$github_release_plugin_version"
|
classpath "com.github.breadmoirai:github-release:$github_release_plugin_version"
|
||||||
|
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:$dexcount_version"
|
||||||
|
classpath 'com.android.tools.build:gradle:4.0.2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,8 +18,9 @@ plugins {
|
|||||||
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
|
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
|
||||||
id "org.jetbrains.dokka" version "$dokka_version"
|
id "org.jetbrains.dokka" version "$dokka_version"
|
||||||
}
|
}
|
||||||
|
apply plugin: "com.android.library"
|
||||||
|
|
||||||
project.version = "0.5.0"
|
project.version = "$version"
|
||||||
project.group = "dev.inmo"
|
project.group = "dev.inmo"
|
||||||
|
|
||||||
apply from: "publish.gradle"
|
apply from: "publish.gradle"
|
||||||
@ -27,6 +31,7 @@ repositories {
|
|||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://kotlin.bintray.com/kotlinx" }
|
maven { url "https://kotlin.bintray.com/kotlinx" }
|
||||||
|
google()
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: './dokka.gradle'
|
apply from: './dokka.gradle'
|
||||||
@ -37,6 +42,9 @@ kotlin {
|
|||||||
browser()
|
browser()
|
||||||
nodejs()
|
nodejs()
|
||||||
}
|
}
|
||||||
|
android {
|
||||||
|
publishAllLibraryVariants()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@ -48,6 +56,13 @@ kotlin {
|
|||||||
api "com.soywiz.korlibs.klock:klock:$klockVersion"
|
api "com.soywiz.korlibs.klock:klock:$klockVersion"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
androidMain {
|
||||||
|
dependencies {
|
||||||
|
api "androidx.work:work-runtime-ktx:$androidx_work_version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
commonTest {
|
commonTest {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation kotlin('test-common')
|
implementation kotlin('test-common')
|
||||||
@ -64,5 +79,45 @@ kotlin {
|
|||||||
implementation kotlin('test-js')
|
implementation kotlin('test-js')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
androidTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-junit')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'com.getkeepsafe.dexcount'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion "$android_compileSdkVersion".toInteger()
|
||||||
|
buildToolsVersion "$android_buildToolsVersion"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion "$android_minSdkVersion".toInteger()
|
||||||
|
targetSdkVersion "$android_compileSdkVersion".toInteger()
|
||||||
|
versionCode "${android_code_version}".toInteger()
|
||||||
|
versionName "$version"
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
}
|
||||||
|
debug {
|
||||||
|
debuggable true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ kotlin.js.generate.externals=true
|
|||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
kotlin.incremental.js=true
|
kotlin.incremental.js=true
|
||||||
kotlin.incremental.multiplatform=true
|
kotlin.incremental.multiplatform=true
|
||||||
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
||||||
|
|
||||||
|
|
||||||
kotlin_version=1.4.21
|
kotlin_version=1.4.21
|
||||||
@ -13,5 +15,24 @@ dokka_version=1.4.20
|
|||||||
|
|
||||||
klockVersion=2.0.3
|
klockVersion=2.0.3
|
||||||
|
|
||||||
|
## Github reease
|
||||||
|
|
||||||
github_release_plugin_version=2.2.12
|
github_release_plugin_version=2.2.12
|
||||||
|
|
||||||
|
## Android
|
||||||
|
|
||||||
|
android_minSdkVersion=19
|
||||||
|
android_compileSdkVersion=30
|
||||||
|
android_buildToolsVersion=30.0.2
|
||||||
|
dexcount_version=2.0.0
|
||||||
|
junit_version=4.12
|
||||||
|
test_ext_junit_version=1.1.2
|
||||||
|
espresso_core=3.3.0
|
||||||
|
|
||||||
|
androidx_work_version=2.4.0
|
||||||
|
|
||||||
|
## Common
|
||||||
|
|
||||||
|
version=0.5.0
|
||||||
|
android_code_version=1
|
||||||
|
|
||||||
|
1
src/main/AndroidManifest.xml
Normal file
1
src/main/AndroidManifest.xml
Normal file
@ -0,0 +1 @@
|
|||||||
|
<manifest package="dev.inmo.krontab"/>
|
18
src/main/kotlin/dev/inmo/krontab/KronSchedulerWorkRequest.kt
Normal file
18
src/main/kotlin/dev/inmo/krontab/KronSchedulerWorkRequest.kt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package dev.inmo.krontab
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import androidx.work.*
|
||||||
|
|
||||||
|
//fun KronScheduler.workRequest(context: Context) = OneTimeWorkRequestBuilder<>()
|
||||||
|
//
|
||||||
|
//abstract class KronSchedulerWorkRequest(
|
||||||
|
// context: Context,
|
||||||
|
// workerParams: WorkerParameters
|
||||||
|
//) : CoroutineWorker(
|
||||||
|
// context,
|
||||||
|
// workerParams
|
||||||
|
//) {
|
||||||
|
// override suspend fun doWork(): Result {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//}
|
Loading…
Reference in New Issue
Block a user