Skip to content

Commit

Permalink
First commit for open source
Browse files Browse the repository at this point in the history
  • Loading branch information
yinjiayi committed Sep 5, 2023
0 parents commit 8941c5f
Show file tree
Hide file tree
Showing 3,949 changed files with 709,023 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
40 changes: 40 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Android CI

on:
push:
branches: [ "*" ]
tags: [ '*.*.*' ]
pull_request:
branches: [ "*" ]

jobs:

build:
runs-on: [self-hosted, linux, x64]
permissions:
contents: read
packages: write
id-token: write

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleEulix

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: client-android
path: app/build/outputs/apk/eulix/release/*.apk
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/.idea/misc.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
/.idea
.idea/*
/app/mapping.txt
84 changes: 84 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH

image: registry.eulix.xyz/collab/infra/public-service/androidsdk:android-30

include:
- project: 'bp/ams-ci-template'
ref: main
file: '/sonarqube.yml'
# - project: 'bp/ams-ci-template'
# ref: main
# file: '/license.yml'
- project: 'bp/ams-ci-template'
ref: main
file: '/cloc.yml'

variables:
ENV_SONARQUBE_TYPE: gradle
ENV_LICENSE_TYPE: gradle
IS_LICENSE_SCANNING: 'false'
IS_LICENSE_SHOW_REPORT: 'false'

stages:
- license_check
- license_fix
- build
- deploy
- codelint
- cloc

build_eulix:
stage: build
tags:
- docker-global-x86_64
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_BRANCH
- if: $CI_MERGE_REQUEST_ID
script:
- export PATH=$PATH:/opt/gradle-6.1.1/bin
- gradle --init-script /root/.gradle/init.gradle clean
- gradle --init-script /root/.gradle/init.gradle assembleEulix
artifacts:
paths:
- app/build/outputs/apk/eulix/release/
- app/build/outputs/mapping/

deploy_eulix:
stage: deploy
dependencies:
- build_eulix
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_BRANCH == 'dev'
- if: $CI_COMMIT_BRANCH == 'release'
- if: $CI_COMMIT_BRANCH == 'main'
script:
- cd app/build/outputs/apk/eulix/release
- export ANDROID_APK_VERSION=$(cat ../../../../../build.gradle | grep "versionName "| grep -Eo '([0-9]+\.+[0-9]+\.+[0-9]{1,2})')
- export ANDROID_APK_NAME_V8=$CI_COMMIT_BRANCH-$(basename *v8a.apk .apk)-alpha.$CI_PIPELINE_ID
- export ANDROID_APK_NAME_V7=$CI_COMMIT_BRANCH-$(basename *v7a.apk .apk)-alpha.$CI_PIPELINE_ID
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file $(basename app/build/outputs/apk/eulix/release/*v8a.apk) ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/eulixspace-android/${ANDROID_APK_VERSION}/${ANDROID_APK_NAME_V8}.apk'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file $(basename app/build/outputs/apk/eulix/release/*v7a.apk) ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/eulixspace-android/${ANDROID_APK_VERSION}/${ANDROID_APK_NAME_V7}.apk'
50 changes: 50 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

header:
license:
spdx-id: Apache-2.0
copyright-owner: ISCAS
software-name: eulixspace-android
content: |
Copyright (c) 2022 Institute of Software, Chinese Academy of Sciences (ISCAS)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
paths:
- '**'

paths-ignore:
- '**/*.md'
- '**/*.json'
- 'LICENSE'
- 'NOTICE'
- 'VERSION'
- 'licenses.yml'
- 'zxinglibs/**'
- 'office/**'
- '.idea/**'
- 'gradlew'
- 'gradlew.bat'
- '**/*.pro'
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# android

Change Log
==========
## Version 1.0.0
* 傲空间Android客户端初始提交
Loading

0 comments on commit 8941c5f

Please sign in to comment.