Skip to content

Commit 8aa7c7c

Browse files
authored
feat: Implement project (#1)
1 parent c413ea8 commit 8aa7c7c

File tree

24 files changed

+2408
-2
lines changed

24 files changed

+2408
-2
lines changed

.github/actions/init/action.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Initialization action
2+
description: Common actions to initialize a Job
3+
4+
inputs:
5+
jdk:
6+
description: Version of JDK that must be loaded.
7+
required: false
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Set up JDK
13+
if: ${{ inputs.jdk != '' }}
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: ${{ inputs.jdk }}
17+
distribution: adopt
18+
19+
- name: Cache gradle
20+
if: ${{ inputs.jdk != '' }}
21+
uses: actions/cache@v3
22+
with:
23+
path: |
24+
~/.gradle/caches
25+
~/.gradle/wrapper
26+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
27+
restore-keys: |
28+
${{ runner.os }}-gradle-
29+
30+
- name: Set permission to execute gradle
31+
shell: bash
32+
run: chmod +x gradlew

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: gradle
5+
directory: "/"
6+
schedule:
7+
interval: daily
8+
time: "12:00"
9+
pull-request-branch-name:
10+
separator: "-"
11+
open-pull-requests-limit: 99
12+
rebase-strategy: disabled
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"

.github/workflows/check-branch.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
paths-ignore:
8+
- '**.md'
9+
10+
concurrency:
11+
group: check-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout project
19+
uses: actions/checkout@v3
20+
21+
- name: Initialization
22+
uses: ./.github/actions/init
23+
with:
24+
jdk: 8
25+
26+
- name: Build
27+
uses: gradle/gradle-build-action@v2.7.0
28+
with:
29+
arguments: build -x test
30+
31+
- name: Test
32+
uses: gradle/gradle-build-action@v2.4.0
33+
with:
34+
arguments: test

.github/workflows/sonar.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: SonarCloud
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
concurrency:
11+
group: sonar-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
name: Build and analyze
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout project
20+
uses: actions/checkout@v3
21+
22+
- name: Initialization
23+
uses: ./.github/actions/init
24+
with:
25+
jdk: 8
26+
27+
- name: Build
28+
uses: gradle/gradle-build-action@v2.7.0
29+
env:
30+
DETEKT_IGNORE_FAILURES: true
31+
with:
32+
arguments: build detekt test jacocoTestReport
33+
34+
- name: SonarCloud Scan
35+
uses: SonarSource/sonarcloud-github-action@master
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/intellij,eclipse,kotlin,gradle
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij,eclipse,kotlin,gradle
4+
5+
### Eclipse ###
6+
.metadata
7+
bin/
8+
tmp/
9+
*.tmp
10+
*.bak
11+
*.swp
12+
*~.nib
13+
local.properties
14+
.settings/
15+
.loadpath
16+
.recommenders
17+
18+
# External tool builders
19+
.externalToolBuilders/
20+
21+
# Locally stored "Eclipse launch configurations"
22+
*.launch
23+
24+
# PyDev specific (Python IDE for Eclipse)
25+
*.pydevproject
26+
27+
# CDT-specific (C/C++ Development Tooling)
28+
.cproject
29+
30+
# CDT- autotools
31+
.autotools
32+
33+
# Java annotation processor (APT)
34+
.factorypath
35+
36+
# PDT-specific (PHP Development Tools)
37+
.buildpath
38+
39+
# sbteclipse plugin
40+
.target
41+
42+
# Tern plugin
43+
.tern-project
44+
45+
# TeXlipse plugin
46+
.texlipse
47+
48+
# STS (Spring Tool Suite)
49+
.springBeans
50+
51+
# Code Recommenders
52+
.recommenders/
53+
54+
# Annotation Processing
55+
.apt_generated/
56+
.apt_generated_test/
57+
58+
# Scala IDE specific (Scala & Java development for Eclipse)
59+
.cache-main
60+
.scala_dependencies
61+
.worksheet
62+
63+
# Uncomment this line if you wish to ignore the project description file.
64+
# Typically, this file would be tracked if it contains build/dependency configurations:
65+
#.project
66+
67+
### Eclipse Patch ###
68+
# Spring Boot Tooling
69+
.sts4-cache/
70+
71+
### Intellij ###
72+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
73+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
74+
75+
.idea
76+
# User-specific stuff
77+
#.idea/**/workspace.xml
78+
#.idea/**/tasks.xml
79+
#.idea/**/usage.statistics.xml
80+
#.idea/**/dictionaries
81+
#.idea/**/shelf
82+
83+
# AWS User-specific
84+
#.idea/**/aws.xml
85+
86+
# Generated files
87+
#.idea/**/contentModel.xml
88+
89+
# Sensitive or high-churn files
90+
#.idea/**/dataSources/
91+
#.idea/**/dataSources.ids
92+
#.idea/**/dataSources.local.xml
93+
#.idea/**/sqlDataSources.xml
94+
#.idea/**/dynamic.xml
95+
#.idea/**/uiDesigner.xml
96+
#.idea/**/dbnavigator.xml
97+
98+
# Gradle
99+
#.idea/**/gradle.xml
100+
#.idea/**/libraries
101+
102+
# Gradle and Maven with auto-import
103+
# When using Gradle or Maven with auto-import, you should exclude module files,
104+
# since they will be recreated, and may cause churn. Uncomment if using
105+
# auto-import.
106+
# .idea/artifacts
107+
# .idea/compiler.xml
108+
# .idea/jarRepositories.xml
109+
# .idea/modules.xml
110+
# .idea/*.iml
111+
# .idea/modules
112+
# *.iml
113+
# *.ipr
114+
115+
# CMake
116+
cmake-build-*/
117+
118+
# Mongo Explorer plugin
119+
.idea/**/mongoSettings.xml
120+
121+
# File-based project format
122+
*.iws
123+
124+
# IntelliJ
125+
out/
126+
127+
# mpeltonen/sbt-idea plugin
128+
.idea_modules/
129+
130+
# JIRA plugin
131+
atlassian-ide-plugin.xml
132+
133+
# Cursive Clojure plugin
134+
.idea/replstate.xml
135+
136+
# Crashlytics plugin (for Android Studio and IntelliJ)
137+
com_crashlytics_export_strings.xml
138+
crashlytics.properties
139+
crashlytics-build.properties
140+
fabric.properties
141+
142+
# Editor-based Rest Client
143+
.idea/httpRequests
144+
145+
# Android studio 3.1+ serialized cache file
146+
.idea/caches/build_file_checksums.ser
147+
148+
### Intellij Patch ###
149+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
150+
151+
# *.iml
152+
# modules.xml
153+
# .idea/misc.xml
154+
# *.ipr
155+
156+
# Sonarlint plugin
157+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
158+
.idea/**/sonarlint/
159+
160+
# SonarQube Plugin
161+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
162+
.idea/**/sonarIssues.xml
163+
164+
# Markdown Navigator plugin
165+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
166+
.idea/**/markdown-navigator.xml
167+
.idea/**/markdown-navigator-enh.xml
168+
.idea/**/markdown-navigator/
169+
170+
# Cache file creation bug
171+
# See https://youtrack.jetbrains.com/issue/JBR-2257
172+
.idea/$CACHE_FILE$
173+
174+
# CodeStream plugin
175+
# https://plugins.jetbrains.com/plugin/12206-codestream
176+
.idea/codestream.xml
177+
178+
### Kotlin ###
179+
# Compiled class file
180+
*.class
181+
182+
# Log file
183+
*.log
184+
185+
# BlueJ files
186+
*.ctxt
187+
188+
# Mobile Tools for Java (J2ME)
189+
.mtj.tmp/
190+
191+
# Package Files #
192+
*.jar
193+
*.war
194+
*.nar
195+
*.ear
196+
*.zip
197+
*.tar.gz
198+
*.rar
199+
200+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
201+
hs_err_pid*
202+
203+
### Gradle ###
204+
.gradle
205+
build/
206+
207+
# Ignore Gradle GUI config
208+
gradle-app.setting
209+
210+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
211+
!gradle-wrapper.jar
212+
213+
# Cache of project
214+
.gradletasknamecache
215+
216+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
217+
# gradle/wrapper/gradle-wrapper.properties
218+
219+
### Gradle Patch ###
220+
**/build/
221+
222+
# Eclipse Gradle plugin generated files
223+
# Eclipse Core
224+
.project
225+
# JDT-specific (Eclipse Java Development Tools)
226+
.classpath
227+
228+
# End of https://www.toptal.com/developers/gitignore/api/intellij,eclipse,kotlin,gradle
229+
230+
# Kotlin common
231+
kotlin-js-store/**
232+
233+
dokka/

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
# kotlin-mojang-api
2-
Library to interact with mojang API using Kotlin and coroutine
1+
# Mojang API
2+
3+
This project allows interaction with [Mojang API](https://mojang-api-docs.netlify.app/)
4+
using [Kotlin](https://kotlinlang.org/) and [coroutine](https://kotlinlang.org/docs/coroutines-overview.html).
5+
6+
## Usage
7+
8+
Check the [wiki](https://github.com/Rushyverse/mojang-api/wiki) to know how to use the project.

0 commit comments

Comments
 (0)