Skip to content

Commit

Permalink
feat: V4 Architecture. (#195)
Browse files Browse the repository at this point in the history
* feat: rewrite page system.

# Conflicts:
#	growingio-autotracker-core/src/main/java/com/growingio/android/sdk/autotrack/inject/ViewChangeProvider.java
#	growingio-autotracker-core/src/main/java/com/growingio/android/sdk/autotrack/inject/ViewClickProvider.java

* 1. 在新设置一个用户信息的场景时(null->userid),由之前的补发VISIT =>不再补发VISIT;
2. 打开收集数据的开关时,强制刷新Session并生成一个VISIT;
3. setLocation 接口不再补发VISIT;
4. 删除 gioid 字段;
5. 删除GlobalSequenceId字段;
6. EventSequenceId 改为全局统计,计(vst、page、click、change、custom);

* Android SDK Version Upgrade
1. targetSdkVersion -> 33
2. AGP -> 7.4.1
3. can use kotlin but may be have version conflicts;
4. use **libs.version.toml** for version control;
5. android module use namespace replace AndroidManifest.xml;
6. remove gio-sdk:autotracker-cdp and gio-sdk:tracker-cdp;
7. make gio-sdk:tracker deprecated.

* fix warning with disableAutomaticComponentCreation

* rewrite v3.0 ViewNode calculate.

* data transfer use protobuf default.
1. add JsonSerializer for event parser in apt;
2. remove ResourceItemCustomEvent.java;
3. sdk use protobuf default.

* fix event accessibility

* autotracker for v4.0.

* find content in group view

* path get alias first.

* Code Architecture Refactoring.
1. hide Provider is called and delete the singleton of the provider;
2. provider is now in TrackerContext;
3. add shutdown method;
3. user spotless format code;

* fix compiler generate

* fix page path

* page's title will auto get from toolbar.

* move getSupportToolBarTitle to autotrack

* fix eventType judge

* 1. don't replace -
2. publish xIndex to xContent

* fix expandlist path

* page add method:getClassName;
fix:tipview don't show at first time.

* feat:ui test (#197)

* add SDK demo as submodule

* update pre release action

* update runner working-directory

* add ci publishAllToMavenLocal.sh

* update uniqueTag xpath

* update uniqueTag xpath

* fix alertDialog xpath

* fix repairPid invoke before sessionProvider setup

* fix fragment page loss autotrack state.
make activity and fragment weakReference.

* test pass

* apm GMonitor need Application Context

* fix: page tree children duplicate;
fix: checkView2PageElement error;
fix: event's platform always is Android.

* fix: v3 circle select element xpath

* fix: v3 circle select element xpath

* add utilInjector

* spotlessApply

* fix hybrid test

* fix: catch InternalError when starting okhttp thread during runtime shutdown.

* add findViewNodesWithinCircle in ViewNodeRenderer class.

* feat: saas adapter (#199)

* feat: saas adapter

* fix

* fix

* feat: support bridgeWebView

* 1. HybridConfiguration post special version when is downgrade.
2. timezoneOffset is String

* fix startAfterSdkSetup method

* version 4.0.0-SNAPSHOT

* spotlessCheck

* feat: disable collection of androidId by default

* feat: disable requireAppProcesses by default

* 1. hide visitor api
2. update bom version

* fix: V4 circler use Page path replace ui

* fix: getAllWindowViews

* feat:通用属性 (#200)

* feat:setGeneralProps

* check props nullable

* rename remove props api

* fix:remove window from xpath

* rename params projectId->accountId

* make generalProp api called in SDK Main Thread.

* rename module: advert -> ads

* only post index when the value >= 0

* add isRunning method to GrowingTracker

* fix:eventBuilder NPE

* index start with -1

* fix:listview indeedindex

* fix:index start with +1

* upload index when >0

* don't support volley module anymore.

* resolve conflict

* spotless

* fix:http test error

* ci: update to java 11

* feat: abtest (#203)

* feat: abtest module

* flutter 2.0

* fix: when restart webservice reset socket state.

* feat: hybrid bridge add datasourceId

* release 4.0.0

* update android-emulator api level to 33

* update android-emulator

---------

Co-authored-by: styluo <[email protected]>
Co-authored-by: tianhui <[email protected]>
Co-authored-by: tianhui <[email protected]>
  • Loading branch information
4 people authored Dec 26, 2023
1 parent 4d29c4f commit d09e0e0
Show file tree
Hide file tree
Showing 624 changed files with 14,501 additions and 22,374 deletions.
50 changes: 7 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: CI

on:
push:
branches: [ master ]

pull_request:
branches: [ master ]
push:
branches: [ master ]

jobs:
build:
Expand All @@ -14,11 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17

- name: Cache SonarCloud packages
uses: actions/cache@v3
Expand All @@ -39,48 +38,13 @@ jobs:
- name: Before script
run: |
chmod +x gradlew
chmod +x config/checkstyle/checkstyle.sh
chmod +x gradle/publishAllToMavenLocal.sh
- name: Run Gradle command
run: |
bash ./gradlew spotlessCheck
bash ./gradle/publishAllToMavenLocal.sh
bash ./config/checkstyle/checkstyle.sh
# ./gradlew lint
# ./gradlew assembleDebug
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
disable-animations: true
api-level: 29
profile: Nexus 6
target: default
arch: x86
disk-size: 2048M
ram-size: 2048M
heap-size: 512M
script: |
adb shell logcat -c
adb shell logcat > ./uiTest.log &
./gradlew jacocoTestReport
./gradlew :demo:jacocoAllReport
- name: Upload logcat
uses: actions/upload-artifact@v3
if: failure()
with:
name: uiTestLog
path: ./uiTest.log

- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonarqube
continue-on-error: true

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./demos/demo/build/reports/jacoco/jacocoAllReport/jacocoAllReport.xml
run: |
bash ./gradlew test --stacktrace
84 changes: 84 additions & 0 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: PRE_RELEASE

on:
pull_request:
types: [ labeled ]

jobs:
build:
if: ${{ github.event.label.name == 'pre release' }}
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Before script
run: |
chmod +x gradlew
chmod +x gradle/publishAllToMavenLocal.sh
chmod +x gradle/preRelease.sh
- name: Run Gradle command
run: |
bash ./gradlew spotlessCheck
bash ./gradle/publishAllToMavenLocal.sh
bash ./gradle/preRelease.sh
- name: Run demo ui tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 33
target: google_apis
arch: x86_64
disk-size: 2048M
ram-size: 2048M
heap-size: 512M
disable-animations: true
working-directory: ./demo
script: ./gradlew :app:connectedAndroidTest --stacktrace

- name: Run sdk unit tests
run: |
bash ./gradlew jacocoTestReport --stacktrace
bash ./gradlew :jacocoAllReport
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonarqube
continue-on-error: true

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./build/reports/jacoco/jacocoAllReport/jacocoAllReport.xml
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
java-version: 11

# Gradle 缓存配置
- name: Cache Gradle packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
java-version: 11

# Gradle 缓存配置
- name: Cache Gradle packages
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/publish_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- autotracker-bom
- hybrid
- okhttp3
- volley
- urlconnection
- database
- debugger
Expand All @@ -34,11 +33,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
java-version: 11

# Gradle 缓存配置
- name: Cache Gradle packages
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "demo"]
path = demo
url = [email protected]:growingio/growingio-sdk-android-demo.git
branch = master
Loading

0 comments on commit d09e0e0

Please sign in to comment.