diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8ef8f37 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +[*.{kt,kts}] +max_line_length = 120 +ij_continuation_indent_size = 4 diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..a9d1603 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,24 @@ +#!/bin/bash +echo "Running ktlintCheck" +if ! ktlintStatus=$(./gradlew --parallel --max-workers=4 ktlintCheck); then + echo "Ktlint must pass before commit!" + exit "$ktlintStatus" +fi + +echo "Running detekt" +if ! detektStatus=$(./gradlew --parallel --max-workers=4 detekt); then + echo "Detekt must pass before commit!" + exit "$detektStatus" +fi + +echo "Running lint" +if ! lintStatus=$(./gradlew --parallel --max-workers=4 lintDebug); then + echo "Lint must pass before commit!" + exit "$lintStatus" +fi + +echo "Running cpd" +if ! cpdStatus=$(./gradlew --parallel --max-workers=4 cpdCheck); then + echo "CPD must pass before commit!" + exit "$cpdStatus" +fi diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100755 index 0000000..189e336 --- /dev/null +++ b/.githooks/pre-push @@ -0,0 +1,60 @@ +#!/bin/bash + +directories=("viewglu") +for directory in "${directories[@]}"; do + if [[ -d "documentation/$directory" ]] ; then + echo "Removing documentation/$directory" + rm -r "documentation/$directory" + fi +done + +if [[ -f "documentation/index.md" ]] ; then + echo "Removing documentation/index.md" + rm -f "documentation/index.md" +fi + +echo "Regenerating documentation" +if ! dokkaStatus=$(./gradlew dokkaGfm); then + echo "Dokka must be successful before pushing!" + exit "$dokkaStatus" +fi + +parentBranch="" +branch=$(git branch --show-current) + +git log --max-count=100 --oneline --decorate=full | { + while read -r line; do + + echo "line: $line" + + if [[ $line == *"origin/$branch"* ]]; then + dest=$(echo "$line" | awk '{ print $2 }') + echo "Found local destination as $dest" + # DO NOT BREAK HERE + fi + + if [[ $line == *"remotes/origin/develop"* ]]; then + parentBranch='develop' + break + fi + if [[ $line == *"remotes/origin/production"* ]]; then + parentBranch='production' + break + fi + + if [[ $line == *"remotes/origin/main"* ]]; then + parentBranch='main' + break + fi + done + + echo "Diffing $branch against parentBranch" + diff=$(git rev-list --left-only --count origin/"$parentBranch"..."$branch") + + if [[ $diff == 0 ]]; then + echo "Looks like you're up to date!" + else + echo "You're behind by $diff commits! Please rebase before pushing!" + exit 1 + fi +} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..6971ad9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +/* @isuPatches diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..d354363 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,33 @@ +--- +name: Bug Report +about: Create a report to help us improve + +--- + +Thank you for creating an issue to improve this library! Please check [the current issues](https://github.com/isupatches/android-viewglu/issues) to make sure that the fix isn't already being worked on. + +It will be _EXTREMELY_ helpful if you also take a look at the [sample app](/app) to see how it behaves and if you can reproduce there. + +**Description** +A clear and concise description of the bug. + +**Additional Context** +Add any other context about the bug here. + +**Screenshots** +If applicable, add screenshots to help explain. + +**Steps To Reproduce** +Steps to reproduce the behavior. + +**Expected Behavior** +A description of what you expected to happen. + +**Actual Behavior** +A description of what actually happened. + +**Additional Information** + - Device (f.e. Nexus 5x): + - OS Version (f.e. Android 8.1): + - Rooted: + - Reproducible with sample app?: diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..24d9bd8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,22 @@ +--- +name: Feature Request +about: Suggest an idea for this project + +--- + +Thank you for creating an issue to improve this library! Please check [the current issues](https://github.com/isupatches/android-viewglu/issues) to make sure that the feature isn't already being worked on. + +**Description** +A clear and concise high-level description of the request. (f.e. As a developer I want ___ so that ___) + +**Reason** +A brief explanation as to why it matters to you and your project. + +**Acceptance Criteria** +Describe in more detail the request. (f.e. - a method is added to the library, - the method when called does ___, etc.) + +**Additional context** +Add any other context about the request here. + +**Images** +If applicable, add relevant images to help explain. diff --git a/.gitignore b/.gitignore index aa724b7..543857d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ .externalNativeBuild .cxx local.properties +keystore.properties +/.idea/deploymentTargetDropDown.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..56dfabb --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 5cd135a..c245ad2 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -11,6 +11,8 @@