-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfix(refactor): remove initialization module and update workflow (#205
) * chore: remove initializer module * fix: build directory path resolution when using `layout.buildDirectory` * feat(platform): update workflows (add workflow for publishing to maven local, aid us in catching publication issues sooner)
- Loading branch information
Showing
16 changed files
with
80 additions
and
125 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: android-publish-artifact | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: | ||
- develop | ||
paths-ignore: | ||
- "app/src/main/**" | ||
|
||
permissions: | ||
checks: write | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: gradle/wrapper-validation-action@v3 | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- name: Wait for tests to succeed | ||
uses: lewagon/wait-on-check-action@v1.3.3 | ||
with: | ||
ref: ${{ github.ref }} | ||
running-workflow-name: android-publish-artifact | ||
check-name: android-unit-test | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 20 | ||
- uses: gradle/actions/setup-gradle@v3 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Publish to local maven | ||
run: | | ||
./gradlew build publishMavenPublicationToMavenLocal | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: publications | ||
path: ~/.m2/repository/io/wax911/emoji/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
24 changes: 21 additions & 3 deletions
24
app/src/main/java/io/wax911/emojifysample/EmojiInitializer.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 |
---|---|---|
@@ -1,9 +1,27 @@ | ||
package io.wax911.emojifysample | ||
|
||
import android.content.Context | ||
import androidx.startup.Initializer | ||
import io.wax911.emojify.EmojiManager | ||
import io.wax911.emojify.contract.serializer.IEmojiDeserializer | ||
import io.wax911.emojify.initializer.AbstractEmojiInitializer | ||
import io.wax911.emojify.serializer.kotlinx.KotlinxDeserializer | ||
|
||
class EmojiInitializer : AbstractEmojiInitializer() { | ||
override val serializer: IEmojiDeserializer = KotlinxDeserializer() | ||
class EmojiInitializer : Initializer<EmojiManager> { | ||
private val serializer: IEmojiDeserializer = KotlinxDeserializer() | ||
|
||
/** | ||
* Initializes and a component given the application [Context] | ||
* | ||
* @param context The application context. | ||
*/ | ||
override fun create(context: Context) = EmojiManager.create(context, serializer) | ||
|
||
/** | ||
* @return A list of dependencies that this [Initializer] depends on. This is | ||
* used to determine initialization order of [Initializer]s. | ||
* | ||
* For e.g. if a [Initializer] `B` defines another | ||
* [Initializer] `A` as its dependency, then `A` gets initialized before `B`. | ||
*/ | ||
override fun dependencies() = emptyList<Class<out Initializer<*>>>() | ||
} |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
initializer/src/main/kotlin/io/wax911/emojify/initializer/AbstractEmojiInitializer.kt
This file was deleted.
Oops, something went wrong.
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