From 9bbe3d65d2aed0b8a8686848ce4e20fb7d8f468e Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Sun, 18 Sep 2022 14:06:48 +0200 Subject: [PATCH] link dokka to github and make builds concurrent --- .../{issue-action.yml => issue_action.yml} | 126 +++++++++--------- .github/workflows/prerelease.yml | 4 +- app/build.gradle | 26 +++- 3 files changed, 86 insertions(+), 70 deletions(-) rename .github/workflows/{issue-action.yml => issue_action.yml} (97%) diff --git a/.github/workflows/issue-action.yml b/.github/workflows/issue_action.yml similarity index 97% rename from .github/workflows/issue-action.yml rename to .github/workflows/issue_action.yml index bfcb10d0..9ca9ff04 100644 --- a/.github/workflows/issue-action.yml +++ b/.github/workflows/issue_action.yml @@ -1,63 +1,63 @@ -name: Issue automatic actions - -on: - issues: - types: [opened, edited] - -jobs: - issue-moderator: - runs-on: ubuntu-latest - steps: - - name: Generate access token - id: generate_token - uses: tibdex/github-app-token@v1 - with: - app_id: ${{ secrets.GH_APP_ID }} - private_key: ${{ secrets.GH_APP_KEY }} - - name: Similarity analysis - uses: actions-cool/issues-similarity-analysis@v1 - with: - token: ${{ steps.generate_token.outputs.token }} - filter-threshold: 0.5 - title-excludes: '' - comment-title: | - ### Your issue looks similar to these issues: - Please close if duplicate. - comment-body: '${index}. ${similarity} #${number}' - - uses: actions/checkout@v2 - - name: Automatically close issues that dont follow the issue template - uses: lucasbento/auto-close-issues@v1.0.2 - with: - github-token: ${{ steps.generate_token.outputs.token }} - issue-close-message: | - @${issue.user.login}: hello! :wave: - This issue is being automatically closed because it does not follow the issue template." - closed-issues-label: "invalid" - - name: Check if issue mentions a provider - id: provider_check - env: - GH_TEXT: "${{ github.event.issue.title }} ${{ github.event.issue.body }}" - run: | - wget --output-document check_issue.py "https://raw.githubusercontent.com/recloudstream/.github/master/.github/check_issue.py" - pip3 install httpx - RES="$(python3 ./check_issue.py)" - echo "::set-output name=name::${RES}" - - name: Comment if issue mentions a provider - if: steps.provider_check.outputs.name != 'none' - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment' - token: ${{ steps.generate_token.outputs.token }} - body: | - Hello ${{ github.event.issue.user.login }}. - Please do not report any provider bugs here. This repository does not contain any providers. Please find the appropriate repository and report your issue there or join the [discord](https://discord.gg/5Hus6fM). - - Found provider name: `${{ steps.provider_check.outputs.name }}` - - name: Add eyes reaction to all issues - uses: actions-cool/emoji-helper@v1.0.0 - with: - type: 'issue' - token: ${{ steps.generate_token.outputs.token }} - emoji: 'eyes' - - +name: Issue automatic actions + +on: + issues: + types: [opened, edited] + +jobs: + issue-moderator: + runs-on: ubuntu-latest + steps: + - name: Generate access token + id: generate_token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.GH_APP_ID }} + private_key: ${{ secrets.GH_APP_KEY }} + - name: Similarity analysis + uses: actions-cool/issues-similarity-analysis@v1 + with: + token: ${{ steps.generate_token.outputs.token }} + filter-threshold: 0.5 + title-excludes: '' + comment-title: | + ### Your issue looks similar to these issues: + Please close if duplicate. + comment-body: '${index}. ${similarity} #${number}' + - uses: actions/checkout@v2 + - name: Automatically close issues that dont follow the issue template + uses: lucasbento/auto-close-issues@v1.0.2 + with: + github-token: ${{ steps.generate_token.outputs.token }} + issue-close-message: | + @${issue.user.login}: hello! :wave: + This issue is being automatically closed because it does not follow the issue template." + closed-issues-label: "invalid" + - name: Check if issue mentions a provider + id: provider_check + env: + GH_TEXT: "${{ github.event.issue.title }} ${{ github.event.issue.body }}" + run: | + wget --output-document check_issue.py "https://raw.githubusercontent.com/recloudstream/.github/master/.github/check_issue.py" + pip3 install httpx + RES="$(python3 ./check_issue.py)" + echo "::set-output name=name::${RES}" + - name: Comment if issue mentions a provider + if: steps.provider_check.outputs.name != 'none' + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment' + token: ${{ steps.generate_token.outputs.token }} + body: | + Hello ${{ github.event.issue.user.login }}. + Please do not report any provider bugs here. This repository does not contain any providers. Please find the appropriate repository and report your issue there or join the [discord](https://discord.gg/5Hus6fM). + + Found provider name: `${{ steps.provider_check.outputs.name }}` + - name: Add eyes reaction to all issues + uses: actions-cool/emoji-helper@v1.0.0 + with: + type: 'issue' + token: ${{ steps.generate_token.outputs.token }} + emoji: 'eyes' + + diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 903878ed..37161d6b 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -43,9 +43,7 @@ jobs: echo "::set-output name=key_pwd::$KEY_PWD" - name: Run Gradle run: | - ./gradlew assemblePrerelease - ./gradlew androidSourcesJar - ./gradlew makeJar + ./gradlew assemblePrerelease makeJar androidSourcesJar env: SIGNING_KEY_ALIAS: "key0" SIGNING_KEY_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }} diff --git a/app/build.gradle b/app/build.gradle index b80c820f..291e71ff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -206,10 +206,28 @@ task androidSourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs//full sources } +// this is used by the gradlew plugin task makeJar(type: Copy) { - // after modifying here, you can export. Jar from('build/intermediates/compile_app_classes_jar/debug') - into('build') // output location - include('classes.jar') // the classes file of the imported rack package - dependsOn build + into('build') + include('classes.jar') + dependsOn('build') } + +dokkaHtml { + moduleName.set("Cloudstream") + dokkaSourceSets { + main { + sourceLink { + // Unix based directory relative path to the root of the project (where you execute gradle respectively). + localDirectory.set(file("src/main/java")) + + // URL showing where the source code can be accessed through the web browser + remoteUrl.set(new URL( + "https://github.com/recloudstream/cloudstream/tree/master/app/src/main/java")) + // Suffix which is used to append the line number to the URL. Use #L for GitHub + remoteLineSuffix.set("#L") + } + } + } +} \ No newline at end of file