mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-1065 Project | Tech | Add license checker (#3007)
This commit is contained in:
parent
32c22bb6e5
commit
c53f6465dd
5 changed files with 64 additions and 6 deletions
25
.github/workflows/check.yml
vendored
25
.github/workflows/check.yml
vendored
|
@ -1,9 +1,9 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
# add "synchronize" in "types", in order to trigger workflow for pull request commit(s) pushes.
|
||||
types: [opened]
|
||||
branches: [develop]
|
||||
# add "synchronize" in "types", in order to trigger workflow for pull request commit(s) pushes.
|
||||
types: [ opened ]
|
||||
branches: [ develop ]
|
||||
name: Run debug unit tests
|
||||
jobs:
|
||||
setup-android:
|
||||
|
@ -20,6 +20,24 @@ jobs:
|
|||
sentry_dsn_secret: ${{ secrets.ANYTYPE_SENTRY_DSN_SECRET }}
|
||||
run: ./middleware2.sh $token_secret $user_secret $amplitude_secret $amplitude_secret_debug $sentry_dsn_secret
|
||||
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
name: Setup license repository
|
||||
repository: anytypeio/open
|
||||
ref: refs/heads/main
|
||||
path: ./open
|
||||
|
||||
- name: Check licenses
|
||||
run: |
|
||||
cd open
|
||||
python3 tools/generate.py --platform android
|
||||
cd ..
|
||||
sudo gem install license_finder
|
||||
license_finder inherited_decisions add open/decisions.yml
|
||||
license_finder --gradle-command="./gradlew \
|
||||
-Pcom.anytype.ci=true \
|
||||
-Dorg.gradle.unsafe.configuration-cache=false"
|
||||
|
||||
- name: Compile android test sources
|
||||
run: make compile_android_test_sources
|
||||
|
||||
|
@ -29,3 +47,4 @@ jobs:
|
|||
- name: Android test report
|
||||
uses: asadmansr/android-test-report-action@v1.2.0
|
||||
if: ${{ always() }} # IMPORTANT: run Android Test Report regardless
|
||||
|
||||
|
|
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
@ -27,6 +27,24 @@ jobs:
|
|||
RELEASE_STORE_PWD: ${{ secrets.RELEASE_STORE_PWD }}
|
||||
run: ./scripts/release/setup-store.sh $token_secret $RELEASE_KEY_ALIAS $RELEASE_KEY_PWD $RELEASE_STORE_PWD
|
||||
|
||||
- name: Setup license repository
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
repository: anytypeio/open
|
||||
ref: refs/heads/main
|
||||
path: ./open
|
||||
|
||||
- name: Check licenses
|
||||
run: |
|
||||
cd open
|
||||
python3 tools/generate.py --platform android
|
||||
cd ..
|
||||
sudo gem install license_finder
|
||||
license_finder inherited_decisions add open/decisions.yml
|
||||
license_finder --gradle-command="./gradlew \
|
||||
-Pcom.anytype.ci=true \
|
||||
-Dorg.gradle.unsafe.configuration-cache=false"
|
||||
|
||||
- name: Build APKS
|
||||
run: ./gradlew :app:assembleRelease
|
||||
|
||||
|
|
13
README.md
13
README.md
|
@ -63,14 +63,21 @@ Or [download](https://download.anytype.io/) an apk for your device architecture
|
|||
```
|
||||
{TASK-ID} {APP AREA} | {NATURE OF CHANGE: Fix, Enhancement, Feature, Design, Documentation} | {CONCISE DESCRIPTION OF WHAT HAS BEEN DONE}
|
||||
```
|
||||
App area can be `App`, `Editor`, `Sets`, `Relations`, `Auth`, `Settings`, `Analytics`, `Tech` (CI, DI, scripting, etc.), etc.
|
||||
|
||||
Example: *Editor | Fix | Show meaningful message when failed to open file by an existing application*
|
||||
App area can be `App`, `Editor`, `Sets`, `Relations`, `Auth`, `Settings`, `Analytics`, `Tech` (CI,
|
||||
DI, scripting, etc.), etc.
|
||||
|
||||
Example: *Editor | Fix | Show meaningful message when failed to open file by an existing
|
||||
application*
|
||||
|
||||
##### Git branch naming
|
||||
|
||||
```
|
||||
{TASK_ID or TASK_NUMBER}-ConciseDescription
|
||||
```
|
||||
|
||||
##### Flags
|
||||
|
||||
|
||||
```
|
||||
com.anytype.ci=true - for CI/CD pipeline
|
||||
```
|
|
@ -7,6 +7,14 @@ plugins {
|
|||
id "com.google.firebase.appdistribution"
|
||||
}
|
||||
|
||||
if (rootProject.ext.onCi) {
|
||||
apply plugin: "com.github.hierynomus.license-report"
|
||||
downloadLicenses {
|
||||
dependencyConfiguration = 'all'
|
||||
includeProjectDependencies = true
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "$rootDir/versioning.gradle"
|
||||
|
||||
def apikeyPropertiesFile = rootProject.file("apikeys.properties")
|
||||
|
|
|
@ -9,6 +9,7 @@ buildscript {
|
|||
ext.version_name = '1.0'
|
||||
ext.version_code = 1
|
||||
ext.test_runner = 'androidx.test.runner.AndroidJUnitRunner'
|
||||
ext.onCi = project.properties.getOrDefault("com.anytype.ci", "false").toBoolean()
|
||||
|
||||
def githubProperties = new Properties()
|
||||
def githubPropertiesFile = file("$rootDir${File.separator}github.properties")
|
||||
|
@ -33,7 +34,12 @@ buildscript {
|
|||
password = githubProperties['gpr.key']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ext.onCi) {
|
||||
dependencies {
|
||||
classpath "com.github.openkin:license-gradle-plugin:0d9582e233"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue