-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SeanZoR/feature/maven-publish
Complete Maven Publish
- Loading branch information
Showing
15 changed files
with
287 additions
and
155 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,7 @@ | ||
# Project-wide Gradle settings. | ||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. For more details, visit | ||
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects | ||
# org.gradle.parallel=true | ||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app's APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
# Kotlin code style for this project: "official" or "obsolete": | ||
kotlin.code.style=official | ||
# Enables namespacing of each library's R class so that its R class includes only the | ||
# resources declared in the library itself and none from the library's dependencies, | ||
# thereby reducing the size of the R class for that library | ||
android.nonTransitiveRClass=true | ||
android.nonTransitiveRClass=true | ||
|
||
SONATYPE_HOST=CENTRAL_PORTAL | ||
RELEASE_SIGNING_ENABLED=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 |
---|---|---|
|
@@ -2,15 +2,15 @@ plugins { | |
alias(libs.plugins.android.library) | ||
alias(libs.plugins.jetbrains.kotlin.android) | ||
alias(libs.plugins.ksp) | ||
`maven-publish` | ||
alias(libs.plugins.custom.maven.publish) | ||
} | ||
|
||
android { | ||
namespace = "com.github.seanzor.hiltcoroutines" | ||
namespace = "com.sean8.hiltcoroutines" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
minSdk = 24 | ||
minSdk = 21 | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
@@ -27,26 +27,35 @@ android { | |
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
|
||
publishing { | ||
singleVariant("release") { | ||
withSourcesJar() | ||
} | ||
} | ||
} | ||
|
||
project.afterEvaluate { | ||
publishing { | ||
publications { | ||
create<MavenPublication>("release") { | ||
from(components["release"]) | ||
mavenPublishing { | ||
coordinates("com.sean8", "hiltcoroutines", "0.0.7") | ||
|
||
// values used for local maven repo, jitpack uses github release: | ||
groupId = "com.github.seanzor" | ||
artifactId = "hiltcoroutines" | ||
version = "0.0.4" | ||
pom { | ||
name.set("HiltCoroutines") | ||
description.set("A library for integrating Hilt with Coroutines.") | ||
inceptionYear.set("2023") | ||
url.set("https://github.com/seanzor/hiltcoroutines/") | ||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
distribution.set("repo") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("Sean8") | ||
name.set("Sean Katz") | ||
url.set("https://sean8.com") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/seanzor/hiltcoroutines/") | ||
connection.set("scm:git:git://github.com/seanzor/hiltcoroutines.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/seanzor/hiltcoroutines.git") | ||
} | ||
} | ||
} | ||
|
||
|
15 changes: 0 additions & 15 deletions
15
hiltcoroutines/src/main/kotlin/com/github/seanzor/hiltcoroutines/AppDispatchers.kt
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
hiltcoroutines/src/main/kotlin/com/github/seanzor/hiltcoroutines/di/CoroutineScopesModule.kt
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
hiltcoroutines/src/main/kotlin/com/github/seanzor/hiltcoroutines/di/DispatchersModule.kt
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
hiltcoroutines/src/main/kotlin/com/sean8/hiltcoroutines/AppDispatchers.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,30 @@ | ||
package com.sean8.hiltcoroutines | ||
|
||
import javax.inject.Qualifier | ||
import kotlin.annotation.AnnotationRetention.RUNTIME | ||
|
||
/** | ||
* Qualifier annotation for specifying different Coroutine Dispatchers. | ||
* | ||
* This is used to distinguish between the different [AppDispatchers] provided | ||
* by the dependency injection framework using Hilt. | ||
* | ||
* @property appDispatcher The dispatcher type from [AppDispatchers]. | ||
*/ | ||
@Suppress("unused") | ||
@Qualifier | ||
@Retention(RUNTIME) | ||
annotation class Dispatcher(val appDispatcher: AppDispatchers) | ||
|
||
/** | ||
* Enum representing the available coroutine dispatchers in the application. | ||
* | ||
* - [Default] corresponds to [Dispatchers.Default]. | ||
* - [IO] corresponds to [Dispatchers.IO]. | ||
* - [Main] corresponds to [Dispatchers.Main]. | ||
*/ | ||
enum class AppDispatchers { | ||
Default, | ||
IO, | ||
Main, | ||
} |
Oops, something went wrong.