diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 708e387b..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,62 +0,0 @@ -version: 2 - -references: - workspace_root: &workspace_root - ~/sdk - - container_config: &container_config - docker: - - image: circleci/openjdk:8-jdk-stretch - working_directory: *workspace_root - - attach_workspace: &attach_workspace - attach_workspace: - at: *workspace_root - - general_cache_key: &general_cache_key - key: cache-{{ checksum "build.gradle" }} - paths: - - ~/.gradle - -jobs: - test: - <<: *container_config - steps: - - *attach_workspace - - checkout - - restore_cache: - <<: *general_cache_key - - - run: ./.circleci/host-hotfix.sh - - run: ./gradlew build -x check --no-daemon --stacktrace --console=plain -PdisablePreDex - - run: ./gradlew check jacocoTestReport --no-daemon --stacktrace --console=plain -PdisablePreDex - - - save_cache: - <<: *general_cache_key - - - run: bash <(curl -s https://codecov.io/bash) - - - store_test_results: - path: ./build/test-results - - store_artifacts: - path: ./build/reports/jacoco/test - - store_artifacts: - path: ./build/reports/tests/test - - store_artifacts: - path: ./build/libs/sdk-0.16.0.jar - deploy: - <<: *container_config - steps: - - *attach_workspace - - checkout - - restore_cache: - <<: *general_cache_key - - - run: ./gradlew bintrayUpload --no-daemon --stacktrace --console=plain -PdisablePreDex - -workflows: - version: 2 - - test: - jobs: - - test diff --git a/.circleci/host-hotfix.sh b/.circleci/host-hotfix.sh deleted file mode 100755 index 4c2ad3ec..00000000 --- a/.circleci/host-hotfix.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -echo "127.0.0.1 fakelog.localhost" | sudo tee -a /etc/hosts -echo "127.0.0.1 adfs.fakelog.localhost" | sudo tee -a /etc/hosts -echo "127.0.0.1 adfslight.fakelog.localhost" | sudo tee -a /etc/hosts -echo "127.0.0.1 cufs.fakelog.localhost" | sudo tee -a /etc/hosts -echo "127.0.0.1 uonetplus.fakelog.localhost" | sudo tee -a /etc/hosts -echo "127.0.0.1 uonetplus-opiekun.fakelog.localhost" | sudo tee -a /etc/hosts -echo "127.0.0.1 uonetplus-uczen.fakelog.localhost" | sudo tee -a /etc/hosts diff --git a/.editorconfig b/.editorconfig index 53dfe170..2bf95ff8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,5 @@ indent_size=2 [*.{kt,kts}] disabled_rules=import-ordering,no-wildcard-imports max_line_length=177 +ij_kotlin_allow_trailing_comma_on_call_site=true +ij_kotlin_allow_trailing_comma=true diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..aae404b9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: +- package-ecosystem: gradle + directory: "/" + schedule: + interval: monthly + open-pull-requests-limit: 10 + ignore: + - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core + versions: + - 1.4.3-native-mt + - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-test + versions: + - 1.4.3-native-mt + - dependency-name: org.jlleitschuh.gradle.ktlint + versions: + - 9.4.1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..08eb88f3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy + +on: + push: + branches: [ master ] + +jobs: + deploy-sonatype: + name: Deploy to sonatype + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: ossrh + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Build and publish + env: + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + MAVEN_SIGNING_KEY: ${{ secrets.MAVEN_SIGNING_KEY }} + MAVEN_SIGNING_PASSWORD: ${{ secrets.MAVEN_SIGNING_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --stacktrace diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..a112e213 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,54 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + + workflow_dispatch: + +jobs: + unit-tests: + name: Unit tests + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: fkirc/skip-duplicate-actions@master + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Unit tests + run: | + ./gradlew test --stacktrace + ./gradlew jacocoTestReport --stacktrace + - uses: codecov/codecov-action@v1 + + lint: + name: Lint check + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: fkirc/skip-duplicate-actions@master + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Lint + run: | + ./gradlew ktlintCheck --stacktrace + - uses: codecov/codecov-action@v1 diff --git a/.gitignore b/.gitignore index 63216734..d962a9c9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,8 +22,36 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -.idea/ -!.idea/codeStyles/ +# IntelliJ configurations +*.iml +.idea/workspace.xml +.idea/tasks.xml +#.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +.idea/caches +.idea/modules.xml +.idea/navEditor.xml +.idea/caches/ +.idea/libraries/ +.idea/shelf/ +.idea/.name +.idea/compiler.xml +.idea/copyright/profiles_settings.xml +.idea/encodings.xml +.idea/misc.xml +.idea/scopes/scope_settings.xml +.idea/vcs.xml +.idea/jsLibraryMappings.xml +.idea/datasources.xml +.idea/dataSources.ids +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml +.idea/runConfigurations.xml +.idea/discord.xml +.idea/jarRepositories.xml .gradle build/ out/ @@ -42,3 +70,8 @@ gradle-app.setting *iml classes +.DS_Store +.idea/libraries-with-intellij-classes.xml +.idea/kotlinc.xml +.idea/jpa-buddy.xml +.idea/kotlinScripting.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 943d7459..25c1a45c 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -4,7 +4,7 @@