-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove FlowCancellationException - fixes #196 (#197) * update Gradle to 6.8 rc1 (#198) * Platform convention plugins (#199) * update Gradle to 6.8 rc1 * add platform convention plugins * update Kotlin to 1.4.21 (#200) * update version to 1.0.0-beta08 * Update CHANGELOG.md
- Loading branch information
Showing
52 changed files
with
316 additions
and
346 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
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,58 @@ | ||
/* | ||
* Copyright (C) 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. | ||
*/ | ||
|
||
@file:Suppress("LongMethod", "TopLevelPropertyNaming") | ||
|
||
import org.gradle.api.* | ||
import org.gradle.kotlin.dsl.* | ||
import org.jetbrains.kotlin.gradle.tasks.* | ||
|
||
fun Project.common() { | ||
|
||
tasks.withType<KotlinCompile>() | ||
.configureEach { | ||
|
||
kotlinOptions { | ||
|
||
allWarningsAsErrors = true | ||
|
||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
// force update all transitive dependencies (prevents some library leaking an old version) | ||
configurations.all { | ||
resolutionStrategy { | ||
force( | ||
Libs.Kotlin.reflect, | ||
// androidx is currently leaking coroutines 1.1.1 everywhere | ||
Libs.Kotlinx.Coroutines.core, | ||
Libs.Kotlinx.Coroutines.test, | ||
Libs.Kotlinx.Coroutines.android, | ||
// prevent dependency libraries from leaking their own old version of this library | ||
Libs.RickBusarow.Dispatch.core, | ||
Libs.RickBusarow.Dispatch.detekt, | ||
Libs.RickBusarow.Dispatch.espresso, | ||
Libs.RickBusarow.Dispatch.lifecycle, | ||
Libs.RickBusarow.Dispatch.lifecycleExtensions, | ||
Libs.RickBusarow.Dispatch.viewModel, | ||
Libs.RickBusarow.Dispatch.Test.core, | ||
Libs.RickBusarow.Dispatch.Test.jUnit4, | ||
Libs.RickBusarow.Dispatch.Test.jUnit5 | ||
) | ||
} | ||
} | ||
|
||
} |
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,68 @@ | ||
/* | ||
* Copyright (C) 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. | ||
*/ | ||
|
||
@file:Suppress("LongMethod") | ||
|
||
import com.android.build.gradle.* | ||
import org.gradle.api.* | ||
import org.gradle.api.JavaVersion.* | ||
import org.gradle.kotlin.dsl.* | ||
import java.io.* | ||
|
||
fun Project.commonAndroid() { | ||
|
||
configure<TestedExtension> { | ||
compileSdkVersion(Versions.compileSdk) | ||
|
||
defaultConfig { | ||
minSdkVersion(Versions.minSdk) | ||
targetSdkVersion(Versions.targetSdk) | ||
versionName = Versions.versionName | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = VERSION_1_8 | ||
targetCompatibility = VERSION_1_8 | ||
} | ||
|
||
lintOptions { | ||
disable("ObsoleteLintCustomCheck") | ||
disable("MissingTranslation") | ||
enable("InvalidPackage") | ||
enable("Interoperability") | ||
isAbortOnError = true | ||
baselineFile = File("$projectDir/lint-baseline.xml") | ||
} | ||
|
||
testOptions { | ||
unitTests.isIncludeAndroidResources = true | ||
unitTests.isReturnDefaultValues = true | ||
animationsDisabled = true | ||
} | ||
} | ||
} | ||
|
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,28 @@ | ||
/* | ||
* Copyright (C) 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. | ||
*/ | ||
|
||
apply(plugin = "com.android.library") | ||
apply(plugin = "org.jetbrains.kotlin.android") | ||
|
||
commonAndroid() | ||
common() | ||
|
||
val testJvm by tasks.registering { | ||
dependsOn("testDebugUnitTest") | ||
} | ||
|
||
val buildTests by tasks.registering { | ||
dependsOn("assembleDebugUnitTest") | ||
} |
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,41 @@ | ||
/* | ||
* Copyright (C) 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. | ||
*/ | ||
|
||
plugins { | ||
kotlin("jvm") | ||
} | ||
|
||
common() | ||
|
||
java { | ||
// force Java 8 source when building java-only artifacts. | ||
// This is different than the Kotlin jvm target. | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
val testJvm by tasks.registering { | ||
dependsOn("test") | ||
} | ||
|
||
val buildTests by tasks.registering { | ||
dependsOn("testClasses") | ||
} | ||
|
||
dependencies { | ||
|
||
api(Libs.Kotlinx.Coroutines.core) | ||
api(Libs.Kotlinx.Coroutines.coreJvm) | ||
} |
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
Oops, something went wrong.