Skip to content

Commit

Permalink
1.0.0-beta01 (#12)
Browse files Browse the repository at this point in the history
* update copyright for 2020

* update codestyle

* update versions for coroutines, kotlin, mockK, and misc. androidx

* set jvm target to 1.6

* add Kdocs and ensure a blank line after copyright headers

* add flowOn operators (#7)

* add flowOn operators

* add flowOn operators

* scripts for publishing to maven central (#8)

* kotlin gradle dsl (#9)

* add kdocs to the test api functions (#11)
  • Loading branch information
RBusarow committed Jan 2, 2020
1 parent ab1c44d commit 8ce9f1a
Show file tree
Hide file tree
Showing 60 changed files with 1,603 additions and 668 deletions.
41 changes: 40 additions & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/copyright/Apache.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinCodeInsightSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.rickbusarow.dispatcherprovider/dispatcher-provider/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.rickbusarow.dispatcherprovider/dispatcher-provider)

# DispatcherProvider

This library replaces usage of the `Dispatchers` singleton object with
Expand Down
31 changes: 0 additions & 31 deletions build.gradle

This file was deleted.

77 changes: 77 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Copyright (C) 2019-2020 Rick Busarow
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.jetbrains.kotlin.gradle.tasks.*

/*
* Copyright (C) 2019-2020 Rick Busarow
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

buildscript {

repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots")
google()
jcenter()
gradlePluginPortal()
}
dependencies {
classpath(BuildPlugins.androidGradlePlugin)
classpath("com.github.ben-manes:gradle-versions-plugin:0.27.0")
classpath(BuildPlugins.kotlinGradlePlugin)
classpath("com.github.dcendents:android-maven-gradle-plugin:2.1")
classpath("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.2")
}
}

//apply("io.codearte.nexus-staging")

allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}

tasks.register("clean").configure {
delete("build")
}

subprojects {
tasks.withType<KotlinCompile>()
.configureEach {
kotlinOptions.jvmTarget = "1.6"
// https://youtrack.jetbrains.com/issue/KT-24946
// kotlinOptions.freeCompilerArgs = listOf(
// "-progressive",
// "-Xskip-runtime-version-check",
// "-Xdisable-default-scripting-plugin",
// "-Xuse-experimental=kotlin.Experimental"
// )
}
}
26 changes: 26 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2019-2020 Rick Busarow
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

repositories {
jcenter()
}

plugins {
`kotlin-dsl`
}

kotlinDslPluginOptions {
experimentalWarning.set(false)
}
117 changes: 117 additions & 0 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Copyright (C) 2019-2020 Rick Busarow
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

object Versions {
const val ktlint = "0.35.0"

const val compileSdk = 29
const val minSdk = "23"
const val targetSdk = 29

const val gradleWrapper = "3.5.3"
const val dagger = "2.25.2"
const val kotlin = "1.3.61"

const val versionName = "1.0.0-beta01"
}

object BuildPlugins {

const val androidGradlePlugin = "com.android.tools.build:gradle:${Versions.gradleWrapper}"
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"

const val androidApplication = "com.android.application"
const val kotlinAndroid = "kotlin-android"
const val kotlinAndroidExtensions = "kotlin-android-extensions"

}

object Libs {

object Androidx {
const val activity = "androidx.activity:activity-ktx:1.0.0"
const val appcompat = "androidx.appcompat:appcompat:1.1.0"
const val constraintLayout = "androidx.constraintlayout:constraintlayout:1.1.3"
const val coreKtx = "androidx.core:core-ktx:1.1.0"
const val lifecycle = "androidx.lifecycle:lifecycle-common-java8:2.1.0"
const val lifecycleExtensions = "androidx.lifecycle:lifecycle-extensions:2.1.0"
const val testEspressoCore = "androidx.test.espresso:espresso-core:3.2.0"
const val testRunner = "androidx.test:runner:1.2.0"
}

object Dagger {
private const val version = "2.25.2"
const val android = "com.google.dagger:dagger-android:$version"
const val androidKapt = "com.google.dagger:dagger-android-processor:$version"
const val androidSupport = "com.google.dagger:dagger-android-support:$version"
const val compiler = "com.google.dagger:dagger-compiler:$version"
const val core = "com.google.dagger:dagger:$version"
}

object JakeWharton {
const val timber = "com.jakewharton.timber:timber:4.7.1"
}

object JUnit {
const val jUnit4 = "junit:junit:4.12"

private const val version = "5.5.1"

const val jUnit5 = "org.junit.jupiter:junit-jupiter:$version"
const val jUnit5Api = "org.junit.jupiter:junit-jupiter-api:$version"
const val jUnit5Params = "org.junit.jupiter:junit-jupiter-params:$version"
const val jUnit5Runtime = "org.junit.jupiter:junit-jupiter-engine:$version"
const val jUnit5Vintage = "org.junit.vintage:junit-vintage-engine:$version"
}

const val kluent = "org.amshove.kluent:kluent:1.53"

object Kotlin {
private const val version = "1.3.61"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val reflect = "org.jetbrains.kotlin:kotlin-reflect:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
const val test = "org.jetbrains.kotlin:kotlin-test:$version"
const val testCommon = "org.jetbrains.kotlin:kotlin-test-common:$version"
}

object KotlinTest {
const val junit4runner = "io.kotlintest:kotlintest-runner-junit4:3.3.3"
}

object Kotlinx {
object Coroutines {
private const val version = "1.3.3"
const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
const val android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version"
const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$version"
}
}

object MockK {
const val core = "io.mockk:mockk:1.9.2"
}

object RickBusarow {

object DispatcherProvider {
private const val version = "0.9.2"
const val core = "com.github.RBusarow.DispatcherProvider:dispatcher-provider:$version"
const val test = "com.github.RBusarow.DispatcherProvider:dispatcher-provider-test:$version"
}
}

}
Loading

0 comments on commit 8ce9f1a

Please sign in to comment.