Skip to content

Commit

Permalink
Refactor/update emoji data and cleanup (#113)
Browse files Browse the repository at this point in the history
* Apply auto formatting

* Apply app module code style

* Apply buildScr code style and exclude test sources from ktlint

* Reformat and align with v5.1.1 of `emoji-java`

See: https://github.com/vdurmont/emoji-java/releases/tag/v5.1.1

* Remove unused resources

- Deletes duplicate `EmojiTransformer`
- Removes unused complier flags

* Add new emoji test data cases
  • Loading branch information
wax911 committed Jun 19, 2023
1 parent c29d6a6 commit 21c379b
Show file tree
Hide file tree
Showing 53 changed files with 4,815 additions and 694 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# https://editorconfig.org/

[*]
indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{java,kt,kts,xml}]
indent_size = 4
max_line_length = 150

[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true

# Don't allow any wildcard imports
ij_kotlin_packages_to_use_import_on_demand = unset

[*.md]
trim_trailing_whitespace = false

[*.toml]
indent_size = 1
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [wax911]
github: [ wax911 ]
patreon: wax911
ko_fi: anitrend
issuehunt: anitrend
11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ labels: ["bug"]

# AniTrend Issue Guidelines

Before opening a new issue, please take a moment to review our [**community guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved.
Before opening a new issue, please take a moment to review our [**community
guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the
contribution process easy and effective for everyone involved.

**You may find an answer in already closed issues**:
https://github.com/AniTrend/android-emojify/issues?q=is%3Aissue+is%3Aclosed

## Description of Bug
<!-- A clear and concise short description of what the bug is. Remember to include the library version if the bug is specific to a release -->

<!-- A clear and concise short description of what the bug is. Remember to include the library version if the bug is specific to a release -->

## Reproduction Steps
<!-- In detail, please explain how and what can be done to reproduce this bug. -->

<!-- In detail, please explain how and what can be done to reproduce this bug. -->

## Screenshots/Videos
<!-- Screenshots or videos usually paint a better picture, if you have non please remove this heading -->

<!-- Screenshots or videos usually paint a better picture, if you have non please remove this heading -->

## Additional Context

<!--
Providing context helps us come up with a solution that is most useful in the real world,
also include any logs if you have any in this section, if not please remove this section
Expand Down
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@ labels: ["feature request"]

# AniTrend Issue Guidelines

Before opening a new issue, please take a moment to review our [**community guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved.
Before opening a new issue, please take a moment to review our [**community
guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the
contribution process easy and effective for everyone involved.

**You may find an answer in already closed issues**:
https://github.com/AniTrend/android-emojify/issues?q=is%3Aissue+is%3Aclosed


## Feature Information
<!-- Is your feature request related to a problem? Please describe and be concise. -->

<!-- Is your feature request related to a problem? Please describe and be concise. -->

## Solution Information

<!--
If you have any ideas regarding the creation of the feature please list them here,
and if not please remove this section
-->


## Additional Context

<!--
Any other information you might want to share, or that doesn't fit into any of the above headings.
If not please remove this section
Expand Down
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ labels: ["question"]

# AniTrend Issue Guidelines

Before opening a new issue, please take a moment to review our [**community guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved.
Before opening a new issue, please take a moment to review our [**community
guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the
contribution process easy and effective for everyone involved.

**You may find an answer in already closed issues**:
https://github.com/AniTrend/android-emojify/issues?q=is%3Aissue+is%3Aclosed

## Question

<!-- Clearly and explicitly explain the details about your question -->

I would like to know if... I have also searched in the closed issues and...

## Additional Context

<!-- Any additional information regarding your question, you may also add screenshots if any under this section -->

I am currently using...
13 changes: 9 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# AniTrend Pull Request

Thank you for contributing! Please take a moment to review our [**contributing guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md)
Thank you for contributing! Please take a moment to review our [**contributing
guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md)
to make the process easy and effective for everyone involved.

**Please open an issue** before embarking on any significant pull request, especially those that
Expand All @@ -10,23 +11,27 @@ on something that might not end up being merged into the project.
Before opening a pull request, please ensure you've done the following:
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- You have followed our [**contributing guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md)
- You have followed our [**contributing
guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md)
- Double checked that your branch is based on `develop` and targets `develop` (where applicable)
- Pull request has tests (if applicable)
- Documentation is updated (if necessary)
- Description explains the issue/use-case resolved


## Description

<!--- Describe your changes in detail, or link an existing issue here -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Enhancement (Improves existing functionality)

<!--- Be kind to code reviewers, and please try to keep pull requests as small and focused as possible :) -->

**IMPORTANT**: By submitting a patch, you agree to allow the project
owners to license your work under the terms of the [Apache License 2.0](https://github.com/AniTrend/android-emojify/blob/develop/LICENSE.md).
owners to license your work under the terms of
the [Apache License 2.0](https://github.com/AniTrend/android-emojify/blob/develop/LICENSE.md).
2 changes: 1 addition & 1 deletion .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ categories:
labels:
- 'bug fix'
- title: '🧰 Maintenance'
labels:
labels:
- 'refactor'
- 'dependencies'
autolabeler:
Expand Down
12 changes: 9 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"extends": [
"config:base"
],
"labels": ["dependencies"],
"baseBranches": ["develop"],
"schedule": ["every weekend"]
"labels": [
"dependencies"
],
"baseBranches": [
"develop"
],
"schedule": [
"every weekend"
]
}
22 changes: 11 additions & 11 deletions .github/workflows/android-spotless.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: android-spotless

on:
on:
push:
branches: [ develop ]
pull_request:
Expand All @@ -11,14 +11,14 @@ jobs:
spotless:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run spotless check
run: ./gradlew spotlessCheck
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run spotless check
run: ./gradlew spotlessCheck
46 changes: 25 additions & 21 deletions .github/workflows/android-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: android-test

on:
on:
push:
branches: [ develop ]
pull_request:
Expand All @@ -13,25 +13,25 @@ jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests
run: |
./gradlew emojify:preTest
./gradlew emojify:test --stacktrace
./gradlew emojify:postTest
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests
run: |
./gradlew emojify:preTest
./gradlew emojify:test --stacktrace
./gradlew emojify:postTest
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/**/TEST-*.xml'

instrumented:
runs-on: macos-latest
Expand All @@ -56,4 +56,8 @@ jobs:
script: ./gradlew connectedCheck
env:
API_LEVEL: ${{ matrix.api-level }}

- name: Publish Integrated Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
12 changes: 6 additions & 6 deletions .github/workflows/first-time-contributer-greeting.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: greeting-first-time-contributor

on: [pull_request_target, issues]
on: [ pull_request_target, issues ]

jobs:
greeting:
Expand All @@ -9,8 +9,8 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hey there! Thank you for creating an issue :) Please take a moment to review our [**community guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved."
pr-message: "Hey there! Thank you for this PR :) Please take a moment to review our [**community guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved."
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hey there! Thank you for creating an issue :) Please take a moment to review our [**community guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved."
pr-message: "Hey there! Thank you for this PR :) Please take a moment to review our [**community guidelines**](https://github.com/AniTrend/android-emojify/blob/develop/CONTRIBUTING.md) to make the contribution process easy and effective for everyone involved."
30 changes: 15 additions & 15 deletions .github/workflows/gradle-dokka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ jobs:
generate-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate docs with dokka
run: ./gradlew emojify:dokkaHtml
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate docs with dokka
run: ./gradlew emojify:dokkaHtml

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.2
with:
branch: docs # The branch the action should deploy to.
folder: emojify/build/docs/dokka # The folder the action should deploy.
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.2
with:
branch: docs # The branch the action should deploy to.
folder: emojify/build/docs/dokka # The folder the action should deploy.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: gradle-wrapper-validation
on: [push, pull_request]
on: [ push, pull_request ]

jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/wrapper-validation-action@v1
6 changes: 3 additions & 3 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: release-drafter
on:
push:
branches:
- 'develop'
- 'develop'
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
types: [ opened, reopened, synchronize ]

permissions:
contents: read

jobs:
update-draft-release:
permissions:
Expand Down
Loading

0 comments on commit 21c379b

Please sign in to comment.