Skip to content

Commit 7ad7651

Browse files
authored
feat: Full rework to support both Kotlin and Java and make it work like the Other SDKs (#2)
1 parent 82aaf7c commit 7ad7651

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2123
-1786
lines changed

.editorconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
root = true
2+
3+
# Base Configuration
4+
[*]
5+
indent_style = tab
6+
indent_size = 4
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
max_line_length = 80
11+
end_of_line = lf
12+
13+
# Yaml Standard
14+
[*.{yaml,yml}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
# Markdown Standards
19+
[*.md]
20+
indent_style = space
21+
indent_size = 2
22+
trim_trailing_whitespace = false
23+
24+
# C++ Standards
25+
[*.{cpp,h,ino}]
26+
indent_style = space
27+
28+
# PHP Standards
29+
[*.php]
30+
indent_style = space
31+
32+
# Java/Kotlin Standards
33+
[*.{java,kt,kts}]
34+
indent_style = space

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+
* text=auto eol=lf

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Bug
2+
description: Use this template if you have found a bug in the SDK
3+
title: "bug: "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this Form!
10+
- type: textarea
11+
id: happening
12+
attributes:
13+
label: What is Hapening
14+
placeholder: "Ex: When using this function the SDK crash..."
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: happen
19+
attributes:
20+
label: Please explain what should happen
21+
description: If you selected Other or new Data Type please put it as the first line
22+
placeholder: "Ex: The SDK should not crash"
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: reproducre
27+
attributes:
28+
label: Please give us a way to reproduce
29+
description: You can list a way or give us access to a minimal Github repo to reproduce it
30+
placeholder: "Ex: https://github.com/you/your-repository"
31+
validations:
32+
required: true
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Enhancement
2+
description: Use this template if you have an Idea that will enhance the SDK
3+
title: "enhancement: "
4+
labels: [enhancement]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this Form!
10+
- type: textarea
11+
id: explain
12+
attributes:
13+
label: Please explain in more details what idea you have
14+
placeholder: "Ex: I would love to see this or this..."
15+
validations:
16+
required: true

.github/PULL_REQUEST_TEMPLATE.md

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

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
9+
- package-ecosystem: "gradle"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
commit-message:
14+
prefix: build
15+
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "daily"
20+
commit-message:
21+
prefix: build

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
7+
8+
name: Java CI with Gradle
9+
10+
on:
11+
push:
12+
branches: [ master ]
13+
pull_request:
14+
branches: [ master ]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
build:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up JDK 11
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: '11'
30+
distribution: 'temurin'
31+
- name: Build with Gradle
32+
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
33+
with:
34+
arguments: build

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
6+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
7+
8+
name: Gradle Package
9+
10+
on:
11+
release:
12+
types: [created]
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK 11
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '11'
28+
distribution: 'temurin'
29+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
30+
settings-path: ${{ github.workspace }} # location for the settings.xml file
31+
32+
- name: Build with Gradle
33+
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
34+
with:
35+
arguments: build
36+
37+
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
38+
# the publishing section of your build.gradle
39+
- name: Publish to GitHub Packages
40+
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
41+
with:
42+
arguments: publish
43+
env:
44+
USERNAME: ${{ github.actor }}
45+
TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)