Skip to content

Commit e6c2188

Browse files
v1.0.0+gh.r2-hotfix
0 parents  commit e6c2188

File tree

8,181 files changed

+1422128
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,181 files changed

+1422128
-0
lines changed

.androidide_root

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DO NOT DELETE!
2+
3+
This file is used in tests to check for the project's root directory.

.commitlintrc.js

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
const fs = require('fs')
2+
const path = require('path')
3+
const {
4+
execSync
5+
} = require('child_process')
6+
7+
// 扫描含 build.gradle(.kts) 的模块,安卓项目识别
8+
function findModules(dir, result = []) {
9+
const entries = fs.readdirSync(dir, {
10+
withFileTypes: true
11+
})
12+
for(const entry of entries) {
13+
if(entry.name.startsWith('.')) continue
14+
15+
const fullPath = path.join(dir, entry.name)
16+
if(entry.isDirectory()) {
17+
const hasGradle = fs.existsSync(path.join(fullPath, 'build.gradle')) ||
18+
fs.existsSync(path.join(fullPath, 'build.gradle.kts'))
19+
20+
if(hasGradle) {
21+
const relPath = path.relative(__dirname, fullPath)
22+
.replace(/\\/g, '/')
23+
result.push(relPath)
24+
} else {
25+
findModules(fullPath, result)
26+
}
27+
}
28+
29+
}
30+
return result
31+
}
32+
33+
// 获取被修改模块名,格式化为 cz-git 的 scope 格式
34+
function getChangedScopes(modules) {
35+
const changed = new Set()
36+
try {
37+
const output = execSync('git status --porcelain', {
38+
encoding: 'utf-8'
39+
})
40+
const files = output.split('\n')
41+
.map(l => l.trim()
42+
.split(/\s+/)
43+
.pop())
44+
45+
for(const file of files) {
46+
for(const mod of modules) {
47+
if(file && file.startsWith(mod + '/')) {
48+
changed.add(mod)
49+
}
50+
}
51+
}
52+
53+
} catch (_) {}
54+
55+
return [...changed]
56+
}
57+
58+
const allModules = findModules(path.resolve(__dirname))
59+
const changedScopes = getChangedScopes(allModules)
60+
61+
/** @type {import('cz-git').UserConfig} */
62+
module.exports = {
63+
rules: {
64+
// @see: https://commitlint.js.org/#/reference-rules
65+
},
66+
67+
prompt: {
68+
messages: {
69+
type: '选择你要提交的类型 :',
70+
scope: '选择一个提交范围(可选):',
71+
customScope: '请输入自定义的提交范围 :',
72+
subject: '填写简短精炼的变更描述 :\n',
73+
body: '填写更加详细的变更描述(可选)。使用 "|" 换行 :\n',
74+
breaking: '列举非兼容性重大的变更(可选)。使用 "|" 换行 :\n',
75+
footerPrefixesSelect: '选择关联issue前缀(可选):',
76+
customFooterPrefix: '输入自定义issue前缀 :',
77+
footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
78+
confirmCommit: '是否提交或修改commit ?',
79+
},
80+
types: [
81+
{ value: 'feat', name: 'feat: 新增功能 | A new feature' },
82+
{ value: 'fix', name: 'fix: 修复缺陷 | A bug fix' },
83+
{ value: 'docs', name: 'docs: 文档更新 | Documentation only changes' },
84+
{ value: 'style', name: 'style: 代码格式 | Changes that do not affect the meaning of the code' },
85+
{ value: 'refactor', name: 'refactor: 代码重构 | A code change that neither fixes a bug nor adds a feature' },
86+
{ value: 'perf', name: 'perf: 性能提升 | A code change that improves performance' },
87+
{ value: 'test', name: 'test: 测试相关 | Adding missing tests or correcting existing tests' },
88+
{ value: 'build', name: 'build: 构建相关 | Changes that affect the build system or external dependencies' },
89+
{ value: 'ci', name: 'ci: 持续集成 | Changes to our CI configuration files and scripts' },
90+
{ value: 'revert', name: 'revert: 回退代码 | Revert to a commit' },
91+
{ value: 'chore', name: 'chore: 其他修改 | Other changes that do not modify src or test files' },
92+
],
93+
allowBreakingChanges: ['feat', 'fix', 'build'],
94+
scopes: allModules,
95+
defaultScope: changedScopes,
96+
// customScopesAlign: changedScopes.length === 0 ? 'top-bottom' : 'bottom',
97+
enableMultipleScopes: true,
98+
scopeEnumSeparator: ",",
99+
markBreakingChangeMode: true
100+
},
101+
}

.github/workflows/asm_build.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build Rv2
2+
3+
on:
4+
push:
5+
branches:
6+
- "dev"
7+
- "main"
8+
- "indexing"
9+
- "release/**"
10+
paths-ignore:
11+
- '**.md'
12+
- '**.json'
13+
- 'fastlane/**'
14+
- '.github/workflows/crowdin_contributors.yml'
15+
pull_request:
16+
branches: [ "dev" ]
17+
paths-ignore:
18+
- '**.md'
19+
- '**.json'
20+
- 'fastlane/**'
21+
- '.github/workflows/crowdin_contributors.yml'
22+
workflow_dispatch: { }
23+
24+
jobs:
25+
build_release_apk:
26+
name: Build Release APK
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Cancel previous runs
30+
uses: styfle/cancel-workflow-action@0.12.1
31+
with:
32+
access_token: ${{ github.token }}
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
with:
36+
submodules: 'recursive'
37+
fetch-depth: 0
38+
- name: Set up JDK 17
39+
uses: actions/setup-java@v4
40+
with:
41+
java-version: '17'
42+
distribution: 'adopt'
43+
- name: Change Gradle wrapper permissions
44+
run: chmod +x ./gradlew
45+
- name: Restore cache
46+
uses: actions/cache@v4
47+
with:
48+
path: |
49+
~/.gradle/caches
50+
~/.gradle/wrapper
51+
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*') }}
52+
restore-keys: |
53+
${{ runner.os }}-gradle-
54+
- name: Create local.properties
55+
run: |
56+
echo "signing.storeFile=signing/signing-key.jks" >> local.properties
57+
echo "signing.storePassword=123456" >> local.properties
58+
echo "signing.keyAlias=android-ide" >> local.properties
59+
echo "signing.keyPassword=123456" >> local.properties
60+
- name: Debug signing setup
61+
run: |
62+
echo "=== Repository structure ==="
63+
find . -name "*.jks" -o -name "local.properties" | head -10
64+
echo ""
65+
echo "=== local.properties content ==="
66+
cat local.properties || echo "local.properties not found"
67+
echo ""
68+
echo "=== SigningDirectory ==="
69+
ls -la core/app/signing/ || echo "core/app/signing directory not found"
70+
- name: Assemble Debug APK
71+
run: ./gradlew :core:app:assembleDebug
72+
# run: ./gradlew :core:app:assembleRelease
73+
- name: List APK files (debug)
74+
run: ls -la core/app/build/outputs/apk/debug/
75+
- name: Upload arm64-v8a Release APK
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: apk-arm64-v8a-debug
79+
path: core/app/build/outputs/apk/debug/*arm64-v8a*.apk
80+
if: always()
81+
- name: Upload armeabi-v7a Release APK
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: apk-armeabi-v7a-release
85+
path: core/app/build/outputs/apk/release/*armeabi-v7a*.apk
86+
if: always()
87+
- name: Upload x86_64 Release APK
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: apk-x86_64-release
91+
path: core/app/build/outputs/apk/release/*x86_64*.apk
92+
if: always()
93+
- name: Upload universal Release APK
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: apk-universal-release
97+
path: core/app/build/outputs/apk/release/*universal*.apk
98+
if: always()

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/build
2+
lint.sh
3+
fmt.sh
4+
clear_runs.py
5+
autopush.sh
6+
server
7+
java/lsp/src/main/java/com/tom/rv2ide/lsp/clang
8+
9+
# Crowdin
10+
crowdin.properties
11+
.idea/crowdin_settings.xml
12+
13+
# Downloaded signing key
14+
#signing-key.jks
15+
16+
# Built application files
17+
*.apk
18+
*.aar
19+
*.ap_
20+
*.aab
21+
22+
# Files for the ART/Dalvik VM
23+
*.dex
24+
25+
# Java class files
26+
*.class
27+
28+
# Generated files
29+
/bin/
30+
/gen/
31+
/out/
32+
# Uncomment the following line in case you need and you don't have the release build type files in your app
33+
# Gradle files
34+
.gradle/
35+
/build/
36+
37+
# Local configuration file (sdk path, etc)
38+
local.properties
39+
40+
# Proguard folder generated by Eclipse
41+
proguard/
42+
43+
# Log Files
44+
*.log
45+
46+
# Android Studio Navigation editor temp files
47+
.navigation/
48+
49+
# Android Studio captures folder
50+
captures/
51+
52+
# IntelliJ
53+
*.iml
54+
.idea/workspace.xml
55+
.idea/tasks.xml
56+
.idea/gradle.xml
57+
.idea/assetWizardSettings.xml
58+
.idea/dictionaries
59+
.idea/libraries
60+
# Android Studio 3 in .gitignore file.
61+
.idea/caches
62+
.idea/modules.xml
63+
.idea/androidTestResultsUserPreferences.xml
64+
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
65+
.idea/navEditor.xml
66+
.idea/deploymentTargetDropDown.xml
67+
.idea/deploymentTargetSelector.xml
68+
.idea/studiobot.xml
69+
70+
# Keystore files
71+
# Uncomment the following lines if you do not want to check your keystore files in.
72+
#*.jks
73+
#*.keystore
74+
75+
# External native build folder generated in Android Studio 2.2 and later
76+
.externalNativeBuild
77+
.cxx/
78+
79+
# Google Services (e.g. APIs or Firebase)
80+
# google-services.json
81+
82+
# Freeline
83+
freeline.py
84+
freeline/
85+
freeline_project_description.json
86+
87+
# fastlane
88+
fastlane/report.xml
89+
fastlane/Preview.html
90+
fastlane/screenshots
91+
fastlane/test_output
92+
fastlane/readme.md
93+
94+
# Version control
95+
vcs.xml
96+
97+
# lint
98+
lint/intermediates/
99+
lint/generated/
100+
lint/outputs/
101+
lint/tmp/
102+
# lint/reports/
103+
104+
# R
105+
scripts/
106+
# signing/
107+
# local.properties
108+
build.log
109+
.androidide

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "composite-builds/external/logback-android"]
2+
path = composite-builds/external/logback-android
3+
url = https://github.com/evil-hero/logback-android

0 commit comments

Comments
 (0)