-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: data and domain use caller co-routine scope (#262)
* chore: remove android.work:work-test module * refactor: simplify data source and factory
- Loading branch information
Showing
29 changed files
with
129 additions
and
290 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,3 +219,5 @@ fabric.properties | |
|
||
# Exclude client credentail files | ||
secrets.properties | ||
|
||
.kotlin/sessions/ |
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
File renamed without changes.
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
41 changes: 41 additions & 0 deletions
41
buildSrc/src/main/java/co/anitrend/arch/buildSrc/plugin/components/ProjectMaven.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,41 @@ | ||
package co.anitrend.arch.buildSrc.plugin.components | ||
|
||
import co.anitrend.arch.buildSrc.plugin.extensions.props | ||
import co.anitrend.arch.buildSrc.plugin.extensions.publishingExtension | ||
import org.gradle.api.Project | ||
import org.gradle.api.publish.maven.MavenPublication | ||
|
||
|
||
internal fun Project.configureMaven() { | ||
publishingExtension().publications { | ||
val component = components.findByName("java") | ||
|
||
logger.lifecycle("Configuring maven publication options for ${path}:maven with component -> ${component?.name}") | ||
create("maven", MavenPublication::class.java) { | ||
groupId = "co.anitrend.arch" | ||
artifactId = project.name | ||
version = props[PropertyTypes.VERSION] | ||
|
||
from(component) | ||
|
||
pom { | ||
name.set("support-arch") | ||
description.set("A multi-module template library that attempts to make clean arch apps easier to build") | ||
url.set("https://github.com/anitrend/support-arch") | ||
licenses { | ||
license { | ||
name.set("Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("wax911") | ||
name.set("Maxwell Mapako") | ||
organizationUrl.set("https://github.com/anitrend") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
35 changes: 35 additions & 0 deletions
35
buildSrc/src/main/java/co/anitrend/arch/buildSrc/plugin/components/ProjectSources.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,35 @@ | ||
package co.anitrend.arch.buildSrc.plugin.components | ||
|
||
import co.anitrend.arch.buildSrc.plugin.extensions.baseExtension | ||
import co.anitrend.arch.buildSrc.plugin.extensions.isKotlinLibraryGroup | ||
import co.anitrend.arch.buildSrc.plugin.extensions.kotlinJvmProjectExtension | ||
import org.gradle.api.Project | ||
import org.gradle.api.tasks.bundling.Jar | ||
import org.gradle.kotlin.dsl.get | ||
import org.gradle.kotlin.dsl.getValue | ||
import org.gradle.kotlin.dsl.provideDelegate | ||
|
||
internal fun Project.configureSources() { | ||
val mainSourceSets = when { | ||
!isKotlinLibraryGroup() -> baseExtension().sourceSets["main"].java.srcDirs | ||
else -> kotlinJvmProjectExtension().sourceSets["main"].kotlin.srcDirs() | ||
} | ||
|
||
val sourcesJar by tasks.register("sourcesJar", Jar::class.java) { | ||
archiveClassifier.set("sources") | ||
from(mainSourceSets) | ||
} | ||
|
||
val classesJar by tasks.register("classesJar", Jar::class.java) { | ||
from("${project.layout.buildDirectory.get()}/intermediates/classes/release") | ||
} | ||
|
||
artifacts { | ||
add("archives", classesJar) | ||
add("archives", sourcesJar) | ||
} | ||
|
||
afterEvaluate { | ||
configureMaven() | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
buildSrc/src/main/java/co/anitrend/arch/buildSrc/plugin/components/ProjectSpotless.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,20 @@ | ||
package co.anitrend.arch.buildSrc.plugin.components | ||
|
||
import co.anitrend.arch.buildSrc.plugin.extensions.libs | ||
import co.anitrend.arch.buildSrc.plugin.extensions.spotlessExtension | ||
import org.gradle.api.Project | ||
|
||
|
||
internal fun Project.configureSpotless(): Unit = spotlessExtension().run { | ||
kotlin { | ||
target("**/*.kt") | ||
targetExclude( | ||
"${layout.buildDirectory.get()}/**/*.kt", | ||
"**/androidTest/**/*.kt", | ||
"**/test/**/*.kt", | ||
"bin/**/*.kt" | ||
) | ||
ktlint(libs.pintrest.ktlint.get().version) | ||
licenseHeaderFile(rootProject.file("spotless/copyright.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
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
39 changes: 0 additions & 39 deletions
39
data/src/main/kotlin/co/anitrend/arch/data/repository/SupportRepository.kt
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
data/src/main/kotlin/co/anitrend/arch/data/repository/contract/ISupportRepository.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.