Skip to content

Commit

Permalink
Finished implementation and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamKobus committed Feb 5, 2022
1 parent 64ce07e commit 1a13c04
Show file tree
Hide file tree
Showing 105 changed files with 4,229 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/outputs
17 changes: 17 additions & 0 deletions .github/actions/gradle-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Gradle Cache'
description: 'Cache Gradle Build Cache to improve workflow execution time'
inputs:
key-prefix:
description: 'A prefix on the key used to store/restore cache'
required: true
runs:
using: "composite"
steps:
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ inputs.key-prefix }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/Libs.kt') }}
restore-keys: |
${{ runner.os }}-${{ inputs.key-prefix }}-
27 changes: 27 additions & 0 deletions .github/pull_request_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### Changes

_Describe what was added, modified or removed and for what purpose

### Testing

_Explain how can this change be tested it it's not clear based on unit tests_

### Checklist

#### General
- [ ] PR targets the `develop` branch
- [ ] PR is linked to the GitHub issue it resolves

#### Source code and docs
- [ ] Changelog is updated (fixes section for a bug, changes for anything that has been added / modified/ removed)
- [ ] New code is covered by unit tests
- [ ] Added ktdoc and updated README.md if API has changed
- [ ] Made sure that unit tests pass
- [ ] Made sure that `ktlintCheck` and `detekt` tasks produce no issues
- [ ] Updated demo app if needed

### Reviewer Checklist
- [ ] Library builds
- [ ] Demo app works
- [ ] Changes work as expected
- [ ] Changelog and documentation updates reflect the modification made in this PR
38 changes: 38 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Release

on:
release:
types: [released]

jobs:
publish:
name: Publish release build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11

- name: Decrypt secrets
run: scripts/decrypt-secrets.sh "${{ secrets.SECRETS_PASSPHRASE }}"

- name: Build project
run: ./gradlew assembleRelease

- name: Create source jar
run: ./gradlew androidSourcesJar

- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
env:
MAVEN_SNAPSHOT: false

- name: Clean up secrets
if: always()
run: scripts/cleanup-secrets.sh
39 changes: 39 additions & 0 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Publish snapshot"

on:
push:
branches:
- develop

jobs:
snapshot-build:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11

- name: Decrypt secrets
run: scripts/decrypt-secrets.sh "${{ secrets.SECRETS_PASSPHRASE }}"

- name: Build project
run: ./gradlew clean assembleRelease

- name: Create source jar
run: ./gradlew androidSourcesJar

- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository
env:
MAVEN_SNAPSHOT: true

- name: Clean up secrets
if: always()
run: scripts/cleanup-secrets.sh
53 changes: 53 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Pull request build"

on:
pull_request:

jobs:
tests:
name: "Tests and code analysis"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2

- name: Configure JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11

- name: Run tests
run: ./gradlew testDebugUnitTest

- name: Run static analysis
run: ./gradlew ktlintCheck detekt

danger:
name: "Danger checks"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2

- name: Set Up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6

- name: Danger Checks
run: |
./gradlew dependencyUpdates -DoutputDir=build/danger
gem install bundler
bundle install
bundle exec danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

gradlewrapper:
name: "Gradle Wrapper Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Build cache and artifacts
.gradle
/build

# Local gradle settings
local.properties
publishing.properties
*.rev
signing.gpg

# IntelliJ
.idea/workspace.xml
.idea/misc.xml
.idea/libraries
.idea/caches
.idea/navEditor.xml
.idea/tasks.xml
.idea/modules.xml
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/deploymentTargetDropDown.xml
gradle.xml
*.iml

# MacOS
.DS_Store

# Layout inspector captures
captures

# JNI
.externalNativeBuild
.cxx
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 140 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Unreleased changes

### Fixes

### Changes

# 1.0.0

### Changes

- Initial release
Loading

0 comments on commit 1a13c04

Please sign in to comment.