Compare commits
	
		
			1 Commits
		
	
	
		
			v124113301
			...
			62f58fbc00
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 62f58fbc00 | 
							
								
								
									
										170
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										170
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,170 @@ | |||||||
|  | kind: pipeline | ||||||
|  | type: docker | ||||||
|  | name: test | ||||||
|  |  | ||||||
|  | steps: | ||||||
|  |   - name: Lint | ||||||
|  |     failure: ignore | ||||||
|  |     image: mingc/android-build-box:latest | ||||||
|  |     commands: | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Install linters..." | ||||||
|  |       - curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.0/ktlint && chmod a+x ktlint && mv ktlint /usr/local/bin/ | ||||||
|  |       - curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.1/detekt-cli-1.23.1.zip && unzip detekt-cli-1.23.1.zip | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Linting..." | ||||||
|  |       - ktlint 'shared/**/*.kt' 'androidApp/**/*.kt' '!shared/build' || true | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Detecting..." | ||||||
|  |       - ./detekt-cli-1.23.1/bin/detekt-cli --all-rules --excludes '**/shared/build/**/*.kt' || true | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |     command_timeout: 1m | ||||||
|  |   - name: BuildAndTest | ||||||
|  |     image: mingc/android-build-box:latest | ||||||
|  |     commands: | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Configure gradle..." | ||||||
|  |       - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Configure java..." | ||||||
|  |       - . ~/.bash_profile | ||||||
|  |       - jenv global 17.0 | ||||||
|  |       - java --version | ||||||
|  |       - date | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Building and testing..." | ||||||
|  |       - ./gradlew build | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  | trigger: | ||||||
|  |   event: | ||||||
|  |     - push | ||||||
|  |     - pull_request | ||||||
|  |  | ||||||
|  | --- | ||||||
|  | kind: pipeline | ||||||
|  | type: docker | ||||||
|  | name: Publish | ||||||
|  |  | ||||||
|  | steps: | ||||||
|  |   - name: createTagAndChangelog | ||||||
|  |     image: ubuntu:latest | ||||||
|  |     commands: | ||||||
|  |       - apt-get update && apt-get install -y git | ||||||
|  |       - git fetch --tags -p | ||||||
|  |       - PREV=$(git describe --tags --abbrev=0) | ||||||
|  |       - ./build.sh --publish --from-ci | ||||||
|  |       - VER=$(git describe --tags --abbrev=0) | ||||||
|  |       - CHANGELOG=$(git log $PREV..HEAD --pretty="- %s") | ||||||
|  |       - echo "**$VER**\n\n$CHANGELOG\n\n--------------------------------------------------------------------\n\n$(cat CHANGELOG.md)" > CHANGELOG.md | ||||||
|  |       - git add CHANGELOG.md | ||||||
|  |       - git commit -m "Changelog for $VER [CI SKIP]" | ||||||
|  |     environment: | ||||||
|  |       TZ: Europe/Paris | ||||||
|  |  | ||||||
|  |   - name: git-push | ||||||
|  |     image: appleboy/drone-git-push | ||||||
|  |     settings: | ||||||
|  |       branch: master | ||||||
|  |       remote: | ||||||
|  |         from_secret: remoteUrl | ||||||
|  |       followtags: true | ||||||
|  |       ssh_key: | ||||||
|  |         from_secret: privateKey | ||||||
|  |       skip_verify: true | ||||||
|  |  | ||||||
|  |   - name: scpFiles | ||||||
|  |     image: appleboy/drone-scp | ||||||
|  |     settings: | ||||||
|  |       host: amine-bouabdallaoui.fr | ||||||
|  |       username: ubuntu | ||||||
|  |       key: | ||||||
|  |         from_secret: privateKey | ||||||
|  |       port: 22 | ||||||
|  |       target: /home/ubuntu/ | ||||||
|  |       source: version.txt | ||||||
|  |  | ||||||
|  |   - name: deploy | ||||||
|  |     image: appleboy/drone-ssh | ||||||
|  |     settings: | ||||||
|  |       host: amine-bouabdallaoui.fr | ||||||
|  |       user: ubuntu | ||||||
|  |       key: | ||||||
|  |         from_secret: privateKey | ||||||
|  |       command_timeout: 2m | ||||||
|  |       script: | ||||||
|  |         - cd /home/ubuntu && sudo rm -rf /var/www/amine/version.txt && sudo chown www-data:www-data ./version.txt && sudo mv version.txt /var/www/amine/ | ||||||
|  |  | ||||||
|  | trigger: | ||||||
|  |   event: | ||||||
|  |     - promote | ||||||
|  |   target: | ||||||
|  |     - production | ||||||
|  |  | ||||||
|  | --- | ||||||
|  | kind: pipeline | ||||||
|  | type: docker | ||||||
|  | name: Release | ||||||
|  |  | ||||||
|  | steps: | ||||||
|  |   - name: build | ||||||
|  |     image: mingc/android-build-box:latest | ||||||
|  |     commands: | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Fetch tags..." | ||||||
|  |       - git fetch --tags | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Configure gradle..." | ||||||
|  |       - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Generate APK" | ||||||
|  |       - ./gradlew :androidApp:assembleGithubConfigRelease | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Get Key" | ||||||
|  |       - wget https://amine-bouabdallaoui.fr/key | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Zipalign" | ||||||
|  |       - $ANDROID_HOME/build-tools/31.0.0/zipalign -f -v 4 androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Sign" | ||||||
|  |       - $ANDROID_HOME/build-tools/31.0.0/apksigner sign -v --out signed.apk --ks ./key --ks-key-alias $YOUR_KEY_ALIAS --ks-pass pass:$YOUR_KEYSTORE_PASSWORD --v1-signing-enabled true --v2-signing-enabled true androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk | ||||||
|  |       - echo "---------------------------------------------------------" | ||||||
|  |       - echo "Verify" | ||||||
|  |       - $ANDROID_HOME/build-tools/31.0.0/apksigner verify signed.apk | ||||||
|  |     environment: | ||||||
|  |       TZ: Europe/Paris | ||||||
|  |       YOUR_KEYSTORE_PASSWORD: | ||||||
|  |         from_secret: keyPass | ||||||
|  |       YOUR_KEY_ALIAS: | ||||||
|  |         from_secret: keyAlias | ||||||
|  |  | ||||||
|  |   - name: gitea_release | ||||||
|  |     image: plugins/gitea-release | ||||||
|  |     settings: | ||||||
|  |       api_key: | ||||||
|  |         from_secret: giteaAPI | ||||||
|  |       base_url: https://gitea.amine-bouabdallaoui.fr | ||||||
|  |       files: signed.apk | ||||||
|  |  | ||||||
|  |   - name: notify | ||||||
|  |     image: drillster/drone-email | ||||||
|  |     failure: ignore | ||||||
|  |     settings: | ||||||
|  |       host: | ||||||
|  |         from_secret: smtpHOST | ||||||
|  |       port: | ||||||
|  |         from_secret: smtpPORT | ||||||
|  |       username: | ||||||
|  |         from_secret: smtpUSERNAME | ||||||
|  |       password: | ||||||
|  |         from_secret: smtpPASSWORD | ||||||
|  |       from: | ||||||
|  |         from_secret: smtpFROM | ||||||
|  |       subject: Mapping file | ||||||
|  |       recipients: | ||||||
|  |         from_secret: smtpTO | ||||||
|  |       recipients_only: true | ||||||
|  |       skip_verify: true | ||||||
|  |       attachment: androidApp/build/outputs/mapping/githubConfigRelease/mapping.txt | ||||||
|  | trigger: | ||||||
|  |   event: | ||||||
|  |     - tag | ||||||
| @@ -1,24 +0,0 @@ | |||||||
| name: Build |  | ||||||
| on: |  | ||||||
|   workflow_call: |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   BuildAndTest: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|       - name: Check out repository code |  | ||||||
|         uses: actions/checkout@v4 |  | ||||||
|         with: |  | ||||||
|           fetch-depth: 0 |  | ||||||
|       - name: Fetch tags |  | ||||||
|         run: git fetch --tags -p |  | ||||||
|       - uses: actions/setup-java@v4 |  | ||||||
|         with: |  | ||||||
|           distribution: 'temurin' |  | ||||||
|           java-version: '17' |  | ||||||
|       - name: Setup Android SDK |  | ||||||
|         uses: android-actions/setup-android@v3 |  | ||||||
|       - name: Configure gradle... |  | ||||||
|         run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties |  | ||||||
|       - name: Build and test |  | ||||||
|         run: ./gradlew build --stacktrace |  | ||||||
| @@ -1,120 +0,0 @@ | |||||||
| name: Create tag |  | ||||||
| on: |  | ||||||
|   push: |  | ||||||
|     branches: |  | ||||||
|       - release |  | ||||||
|   workflow_dispatch: |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   build: |  | ||||||
|     uses: ./.gitea/workflows/common_build.yml |  | ||||||
|   createTagAndChangelog: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     needs: build |  | ||||||
|     steps: |  | ||||||
|       - name: Check out repository code |  | ||||||
|         uses: actions/checkout@v4 |  | ||||||
|         with: |  | ||||||
|           fetch-depth: 0 |  | ||||||
|       - name: Config git |  | ||||||
|         run: | |  | ||||||
|           git config --global user.email aminecmi+giteadrone@pm.me |  | ||||||
|           git config --global user.name giteadrone |  | ||||||
|       - name: Creating the tag and generate changelog |  | ||||||
|         run: | |  | ||||||
|           git fetch --tags -p |  | ||||||
|           PREV=$(git describe --tags --abbrev=0) |  | ||||||
|           ./build.sh --publish --from-ci |  | ||||||
|           VER=$(git describe --tags --abbrev=0) |  | ||||||
|           CHANGELOG=$(git log $PREV..HEAD --pretty="- %s") |  | ||||||
|           echo "**$VER |  | ||||||
|            |  | ||||||
|           $CHANGELOG |  | ||||||
|            |  | ||||||
|           -------------------------------------------------------------------- |  | ||||||
|            |  | ||||||
|           $(cat CHANGELOG.md)" > CHANGELOG.md |  | ||||||
|           git add CHANGELOG.md |  | ||||||
|           git commit -m "Changelog for $VER" |  | ||||||
|       - name: Push changes |  | ||||||
|         uses: appleboy/git-push-action@v1.0.0 |  | ||||||
|         with: |  | ||||||
|           author_name: giteadrone |  | ||||||
|           author_email: aminecmi+giteadrone@pm.me |  | ||||||
|           remote: ${{ secrets.REMOTE_URL }} |  | ||||||
|           followtags: true |  | ||||||
|           ssh_key: ${{ secrets.PRIVATE_KEY }} |  | ||||||
|           tags: true |  | ||||||
|           branch: release |  | ||||||
|       - name: copy file via ssh password |  | ||||||
|         uses: appleboy/scp-action@v0.1.7 |  | ||||||
|         with: |  | ||||||
|           host: amine-bouabdallaoui.fr |  | ||||||
|           username: ubuntu |  | ||||||
|           key: ${{ secrets.PRIVATE_KEY }} |  | ||||||
|           source: "version.txt" |  | ||||||
|           target: "/home/ubuntu/" |  | ||||||
|       - name: deploy version file |  | ||||||
|         uses: appleboy/ssh-action@v1.2.0 |  | ||||||
|         with: |  | ||||||
|           host: amine-bouabdallaoui.fr |  | ||||||
|           username: ubuntu |  | ||||||
|           key: ${{ secrets.PRIVATE_KEY }} |  | ||||||
|           script: cd /home/ubuntu && sudo rm -rf /var/www/amine/version.txt && sudo chown www-data:www-data ./version.txt && sudo mv version.txt /var/www/amine/ |  | ||||||
|   release: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     needs: createTagAndChangelog |  | ||||||
|     steps: |  | ||||||
|       - name: Check out repository code |  | ||||||
|         uses: actions/checkout@v4 |  | ||||||
|         with: |  | ||||||
|           fetch-depth: 0 |  | ||||||
|       - name: Fetch tags |  | ||||||
|         id: version |  | ||||||
|         run: | |  | ||||||
|           git fetch --tags -p |  | ||||||
|           PREV=$(git describe --tags --abbrev=0) |  | ||||||
|           echo $PREV |  | ||||||
|           echo "VERSION=$PREV" >> $GITHUB_OUTPUT |  | ||||||
|       - uses: actions/setup-java@v4 |  | ||||||
|         with: |  | ||||||
|           distribution: 'temurin' |  | ||||||
|           java-version: '17' |  | ||||||
|       - name: Setup Android SDK |  | ||||||
|         uses: android-actions/setup-android@v3 |  | ||||||
|       - name: Configure gradle... |  | ||||||
|         run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties |  | ||||||
|       - name: setup go |  | ||||||
|         uses: https://github.com/actions/setup-go@v4 |  | ||||||
|         with: |  | ||||||
|           go-version: '>=1.20.1' |  | ||||||
|       - name: Generate APK |  | ||||||
|         run: ./gradlew :androidApp:assembleGithubConfigRelease |  | ||||||
|       - name: Get Key |  | ||||||
|         run: wget ${{ secrets.KEY_URL }} |  | ||||||
|       - name: Zippalign |  | ||||||
|         run: | |  | ||||||
|           sdkmanager "build-tools;31.0.0" |  | ||||||
|           ls $ANDROID_HOME/build-tools  |  | ||||||
|           $ANDROID_HOME/build-tools/31.0.0/zipalign -f -v 4 androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk |  | ||||||
|       - name: Sigh |  | ||||||
|         run: $ANDROID_HOME/build-tools/31.0.0/apksigner sign -v --out signed.apk --ks ./key --ks-key-alias ${{ secrets.KEY_ALIAS }} --ks-pass pass:${{ secrets.KEYSTORE_PASSWORD }} --v1-signing-enabled true --v2-signing-enabled true androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk |  | ||||||
|       - name: Verify |  | ||||||
|         run: $ANDROID_HOME/build-tools/31.0.0/apksigner verify signed.apk |  | ||||||
|       - name: Release |  | ||||||
|         uses: https://gitea.com/actions/gitea-release-action@main |  | ||||||
|         with: |  | ||||||
|           files: signed.apk |  | ||||||
|           token: ${{ secrets.API_KEY }} |  | ||||||
|           tag_name: ${{ steps.version.outputs.VERSION }} |  | ||||||
|       - name: Send mail |  | ||||||
|         uses: https://github.com/dawidd6/action-send-mail@v4 |  | ||||||
|         with: |  | ||||||
|           connection_url: ${{ secrets.MAIL_CONNECTION }} |  | ||||||
|           to: ${{ secrets.MAIL_TO }} |  | ||||||
|           from: ${{ secrets.MAIL_FROM }} |  | ||||||
|           subject: Mapping file |  | ||||||
|           priority: high |  | ||||||
|           convert_markdown: true |  | ||||||
|           body: Nouveau fichier de mapping |  | ||||||
|           attachments: androidApp/build/outputs/mapping/githubConfigRelease/mapping.txt |  | ||||||
| @@ -1,26 +0,0 @@ | |||||||
| name: Check PR code |  | ||||||
| on: |  | ||||||
|   pull_request: |  | ||||||
|     branches: |  | ||||||
|       - master |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   Lint: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|       - name: Check out repository code |  | ||||||
|         uses: actions/checkout@v4 |  | ||||||
|       - uses: actions/setup-java@v4 |  | ||||||
|         with: |  | ||||||
|           distribution: 'temurin' # See 'Supported distributions' for available options |  | ||||||
|           java-version: '17' |  | ||||||
|       - name: Install klint |  | ||||||
|         run: curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.0/ktlint && chmod a+x ktlint && mv ktlint /usr/local/bin/ |  | ||||||
|       - name: Install detekt |  | ||||||
|         run: curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.1/detekt-cli-1.23.1.zip && unzip detekt-cli-1.23.1.zip |  | ||||||
|       - name: Linting... |  | ||||||
|         run: ktlint 'shared/**/*.kt' 'androidApp/**/*.kt' '!shared/build' || true |  | ||||||
|       - name: Detecting... |  | ||||||
|         run: ./detekt-cli-1.23.1/bin/detekt-cli --all-rules --excludes '**/shared/build/**/*.kt' || true |  | ||||||
|   build: |  | ||||||
|     uses: ./.gitea/workflows/common_build.yml |  | ||||||
| @@ -1,9 +0,0 @@ | |||||||
| name: Check master code |  | ||||||
| on: |  | ||||||
|   push: |  | ||||||
|     branches: |  | ||||||
|       - master |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   build: |  | ||||||
|     uses: ./.gitea/workflows/common_build.yml |  | ||||||
| @@ -1,4 +1,4 @@ | |||||||
| # ReaderForSelfoss-multiplatform [](https://gitea.amine-bouabdallaoui.fr/Louvorg/ReaderForSelfoss-multiplatform/actions?workflow=on_push.yml&actor=0&status=0) | # ReaderForSelfoss-multiplatform [](https://build.amine-bouabdallaoui.fr/Louvorg/ReaderForSelfoss-multiplatform) | ||||||
|  |  | ||||||
| [](https://crowdin.com/project/readerforselfoss) | [](https://crowdin.com/project/readerforselfoss) | ||||||
|  |  | ||||||
| @@ -10,6 +10,10 @@ If you are a user, you can still create new issues. I'll fix them when I can. | |||||||
|  |  | ||||||
| <a href="https://f-droid.org/packages/bou.amine.apps.readerforselfossv2.android"><img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="100"></a> | <a href="https://f-droid.org/packages/bou.amine.apps.readerforselfossv2.android"><img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="100"></a> | ||||||
|  |  | ||||||
|  | ## Screen captures | ||||||
|  |  | ||||||
|  | <img src="res//fr-card.png?raw=true" alt="card view" width="400"/> <img src="res//fr-list.png?raw=true" alt="list view" width="400"/> | ||||||
|  |  | ||||||
| ## Like my app ? | ## Like my app ? | ||||||
|  |  | ||||||
| <a href="https://www.buymeacoffee.com/aminecmi" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/lato-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a> | <a href="https://www.buymeacoffee.com/aminecmi" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/lato-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a> | ||||||
|   | |||||||
							
								
								
									
										5
									
								
								sonar-project.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								sonar-project.properties
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | sonar.projectKey=RFS2 | ||||||
|  | sonar.coverage.jacoco.xmlReportPaths=build/reports/kover/merged/xml/report.xml | ||||||
|  | sonar.sourceEncoding=UTF-8 | ||||||
|  | sonar.sources=. | ||||||
|  | sonar.exclusions=shared/src/iosArm64Main/**, shared/src/iosX64Main/**, docs/**  | ||||||
		Reference in New Issue
	
	Block a user