feat: Full rework to support both Kotlin and Java and make it work like the Other SDKs (#2)

This commit is contained in:
2022-05-04 15:25:49 +02:00
committed by GitHub
parent 82aaf7cb01
commit 7ad76513e0
56 changed files with 2126 additions and 1789 deletions

32
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Bug
description: Use this template if you have found a bug in the SDK
title: "bug: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this Form!
- type: textarea
id: happening
attributes:
label: What is Hapening
placeholder: "Ex: When using this function the SDK crash..."
validations:
required: true
- type: textarea
id: happen
attributes:
label: Please explain what should happen
description: If you selected Other or new Data Type please put it as the first line
placeholder: "Ex: The SDK should not crash"
validations:
required: true
- type: textarea
id: reproducre
attributes:
label: Please give us a way to reproduce
description: You can list a way or give us access to a minimal Github repo to reproduce it
placeholder: "Ex: https://github.com/you/your-repository"
validations:
required: true

16
.github/ISSUE_TEMPLATE/enhancement.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Enhancement
description: Use this template if you have an Idea that will enhance the SDK
title: "enhancement: "
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this Form!
- type: textarea
id: explain
attributes:
label: Please explain in more details what idea you have
placeholder: "Ex: I would love to see this or this..."
validations:
required: true

5
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,5 @@
<!--
Thanks for your Pull Request, Please provide the related Issue using "Fix #0" or describe the change(s) you made.
The issue title must follow Conventional Commit (verified by Github Actions) conventionalcommits.org.
More informations at https://github.com/tcgdex/cards-database/blob/master/CONTRIBUTING.md
-->

21
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: build
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: build

34
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,34 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
arguments: build

45
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,45 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: Gradle Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Gradle
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
arguments: build
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
arguments: publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}