Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync upstream #3

Merged
merged 80 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
a82a4e1
Prepare for release 2.0.0
EDsCODE Nov 8, 2022
b861bfa
Prepare next development version.
EDsCODE Nov 8, 2022
5a617a4
add dexcount
EDsCODE Nov 8, 2022
1f1a612
update releasing instructions
EDsCODE Nov 10, 2022
cf546db
Make sure defaultOptions are configured on capture calls (#17)
EDsCODE Jan 30, 2023
55b410d
Prepare for release 2.0.1
EDsCODE Jan 30, 2023
97b788d
Prepare next development version.
EDsCODE Jan 30, 2023
870611a
add testing instructions (#19)
liyiy Jan 31, 2023
841e4a8
Fix feature flags tests with missing distinct ID (#20)
liyiy Feb 3, 2023
507af4f
Create android library test CI (#21)
liyiy Feb 9, 2023
d68f220
Revert "Make sure defaultOptions are configured on capture calls (#17…
EDsCODE Feb 21, 2023
ee06ef9
Prepare for release 2.0.2.
EDsCODE Feb 21, 2023
a9fcbf3
Prepare next development version.
EDsCODE Feb 21, 2023
79dc092
chore: send feature flags by default (#24)
EDsCODE Feb 23, 2023
b8866ef
Prepare for release 2.0.3.
EDsCODE Feb 23, 2023
5718c1d
Prepare next development version.
EDsCODE Feb 23, 2023
09940e6
ci: run tests on master as well (#25)
hazzadous Apr 5, 2023
6a53f45
Next major Android SDK v3 (#30)
marandaneto Oct 3, 2023
8e5e870
Add alpha.4 to changelog entry (#31)
marandaneto Oct 3, 2023
ad93db0
Update version
Oct 3, 2023
b6d6ad4
Update USAGE.md to alpha 4
marandaneto Oct 4, 2023
5ac165c
improve usage
marandaneto Oct 4, 2023
7507631
Does not report screen events if there's no title (#32)
marandaneto Oct 4, 2023
6dd28f0
Add `distinctId()` getter to the Public API (#33)
marandaneto Oct 4, 2023
2b5027b
Add Danger changelog checker (#34)
marandaneto Oct 4, 2023
b28d7c8
Fix `device_type` typo (#35)
marandaneto Oct 4, 2023
72d2e0b
Fix flaky test by setting the file's timestamp (#36)
marandaneto Oct 4, 2023
42f962a
Add compatibility to Java 8 bytecode (previously Java 11+) (#37)
marandaneto Oct 4, 2023
f8e538a
update changelog
marandaneto Oct 4, 2023
2cd0062
Update version
Oct 4, 2023
eea1e33
Upsert flags when loading feature flags with computed errors (#38)
marandaneto Oct 5, 2023
6d357ec
active_feature_flags event should filter non active flags (#41)
marandaneto Oct 6, 2023
ac63596
add changelog for 3.0.0-alpha.6
marandaneto Oct 6, 2023
4e435df
Update version
Oct 6, 2023
21c328e
Bump styfle/cancel-workflow-action from 0.11.0 to 0.12.0 (#43)
dependabot[bot] Oct 9, 2023
9c7eaab
isFeatureEnabled now returns true if multivariant flag (#42)
marandaneto Oct 9, 2023
4da8cb0
getFeatureFlagPayload returns non strigified JSON (#44)
marandaneto Oct 10, 2023
53691d4
add changelog entry
marandaneto Oct 10, 2023
1eee12c
Update version
Oct 10, 2023
433662b
change token to api_key for decide API (#46)
marandaneto Oct 11, 2023
9f906fe
SDK only sends the event once per flag (#47)
marandaneto Oct 11, 2023
c8a714b
Groups are cached in the disk (#48)
marandaneto Oct 12, 2023
920bf3a
add changelog entry
marandaneto Oct 12, 2023
df44496
Update version
Oct 12, 2023
1cc8200
`distinct_id` is always a top level property only (#49)
marandaneto Oct 13, 2023
a51ff9b
Cache registered properties (#51)
marandaneto Oct 18, 2023
86f2f83
changelog 3.0.0-beta.1
marandaneto Oct 18, 2023
300c0c1
Update version
Oct 18, 2023
50c8d1b
Keep trying to flush events till the device is connected (#54)
marandaneto Oct 20, 2023
c56a25a
changelog 3.0.0-beta.2
marandaneto Oct 20, 2023
32821a3
Update version
Oct 20, 2023
4ea7477
Ship proguard rules for proguard/r8 full mode (#52)
marandaneto Oct 24, 2023
a17da13
Remove properties from `identify` and `alias` (#55)
marandaneto Oct 24, 2023
3f9b7b9
Fix enhancement typo (#56)
marandaneto Nov 2, 2023
6f29d64
Add 3.0.0-beta.3 to changelog
marandaneto Nov 2, 2023
e7651f6
Update version
Nov 2, 2023
3aab54e
Update CONTRIBUTING.md
marandaneto Nov 2, 2023
71a7692
Add development guide and badges (#57)
marandaneto Nov 2, 2023
e299cba
Update release tag (#58)
marandaneto Nov 6, 2023
54e9267
Fix leaked resources identified by StrictMode (#59)
marandaneto Nov 7, 2023
8c5c9fb
add 3.0.0-beta.4 changelog entry
marandaneto Nov 8, 2023
264f487
Update version
Nov 8, 2023
c3674e8
ammend releasing steps
marandaneto Nov 8, 2023
8a905bc
Expose and allow to enable and disable the debug mode at runtime (#60)
marandaneto Nov 8, 2023
0e1fb69
Pick up consumer proguard rules correctly (#62)
marandaneto Nov 14, 2023
7decf9e
Cache and read feature flags on the disk (#61)
marandaneto Nov 14, 2023
bbfdf6b
Fix Release as a non-Draft and manually create a tag before release (…
marandaneto Nov 14, 2023
fb306db
3.0.0-beta.5 changelog entry
marandaneto Nov 14, 2023
fe28b8d
Update version
marandaneto Nov 14, 2023
0cc233c
Properties sanitizer (#64)
marandaneto Nov 14, 2023
a5cf296
3.0.0-beta.6 changelog entry
marandaneto Nov 14, 2023
ac5322d
Update version
marandaneto Nov 14, 2023
8f91b8e
Updated deprecated buildDir Gradle (#65)
marandaneto Nov 14, 2023
d812492
Do not set network carrier if empty (#66)
marandaneto Nov 14, 2023
9c0b3a5
Add Animal sniffer for Java 8 compat/Android classes (#67)
marandaneto Nov 15, 2023
01278e4
Add 3.0.0-RC.1 entry to changelog
marandaneto Nov 20, 2023
524223a
Update version
marandaneto Nov 20, 2023
d65ad28
Bump Kotlin to min. 1.6 compatibility (#68)
marandaneto Nov 21, 2023
55da84d
Merge remote-tracking branch 'upstream/main' into sync-upstream
Nov 29, 2023
32cf770
TW release customizations
Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .buildscript/deploy_snapshot.sh

This file was deleted.

1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @marandaneto
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 🐞 Bug Report
description: Tell us about something that's not working the way we (probably) intend.
labels: ["Platform: Android", "bug"]
body:


- type: input
id: version
attributes:
label: Version
description: SDK Version
placeholder: 3.0.0 ← should look like this
validations:
required: true

- type: textarea
id: repro
attributes:
label: Steps to Reproduce
description: How can we see what you're seeing? Specific is terrific.
placeholder: |-
1. foo
2. bar
3. baz
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Result
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Result
description: Logs? Screenshots? Yes, please.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask in the forums
url: https://posthog.com/questions
about: A place to ask questions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 💡 Feature Request
description: Tell us about a problem our SDK could solve but doesn't.
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem Statement
description: What problem could we solve that it doesn't?
placeholder: |-
I want to make whirled peas, but it doesn't blend.
validations:
required: true

- type: textarea
id: expected
attributes:
label: Solution Brainstorm
description: We know you have bright ideas to share ... share away, friend.
placeholder: |-
Add a blender to it.
validations:
required: false
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/maintainer-blank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Blank Issue
description: Blank Issue. Reserved for maintainers.
body:
- type: textarea
id: description
attributes:
label: Description
description: Please describe the issue.
validations:
required: true
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## :bulb: Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->


## :green_heart: How did you test it?


## :pencil: Checklist
<!--- Put an `x` in the boxes that apply -->

- [ ] I reviewed the submitted code.
- [ ] I added tests to verify the changes.
- [ ] I updated the docs if needed.
- [ ] No breaking change or entry added to the changelog.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'Build & Test'
on:
push:
branches:
- main
pull_request:
paths-ignore:
- "**/*.md"

jobs:
cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # pin@0.12.0
with:
access_token: ${{ github.token }}

build:
name: Build Job ${{ matrix.os }} - Java ${{ matrix.java }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['17']

steps:
- name: Git checkout
uses: actions/checkout@v4

- name: 'Set up Java: ${{ matrix.java }}'
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Cache Gradle packages
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: Make compile
run: make compile

- name: Make stop
run: make stop
16 changes: 16 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Danger"
on:
pull_request:
types: [opened, synchronize, reopened, edited, ready_for_review]

jobs:
build:
name: Changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: npx danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Validate Gradle Wrapper'
on:
push:
branches:
- main
pull_request:
paths-ignore:
- "**/*.md"

jobs:
validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # pin@v1.1.0
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'Release'
on:
release:
# runs for stable and pre-releases
types: [published]

jobs:
cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # pin@0.12.0
with:
access_token: ${{ github.token }}

release:
name: Release Job ${{ matrix.os }} - Java ${{ matrix.java }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: ['17']
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

steps:
- name: Git checkout
uses: actions/checkout@v4

- name: 'Set up Java: ${{ matrix.java }}'
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'

# Let's be sure that everything works before we release
- name: Dry release
run: make dryRelease

- name: Release
run: make release
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,7 @@ build/
gradle-app.setting

# Jacoco
/posthog/jacoco.exec
/posthog/jacoco.exec

# eclipse
.project/
17 changes: 0 additions & 17 deletions .project

This file was deleted.

89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,92 @@
## Next

- Bump Kotlin to min. 1.6 compatibility ([#68](https://github.com/PostHog/posthog-android/pull/68))

## 3.0.0-RC.1 - 2023-11-20

- Do not set `$network_carrier` property if empty ([#66](https://github.com/PostHog/posthog-android/pull/66))

## 3.0.0-beta.6 - 2023-11-14

- Add a `propertiesSanitizer` callback configuration ([#64](https://github.com/PostHog/posthog-android/pull/64))

## 3.0.0-beta.5 - 2023-11-14

- Expose and allow to enable and disable the debug mode at runtime ([#60](https://github.com/PostHog/posthog-android/pull/60))
- Cache and read feature flags on the disk ([#61](https://github.com/PostHog/posthog-android/pull/61))
- Pick up consumer proguard rules correctly ([#62](https://github.com/PostHog/posthog-android/pull/62))

## 3.0.0-beta.4 - 2023-11-08

- Fix leaked resources identified by StrictMode ([#59](https://github.com/PostHog/posthog-android/pull/59))

## 3.0.0-beta.3 - 2023-11-02

- Ship proguard rules for proguard/r8 full mode ([#52](https://github.com/PostHog/posthog-android/pull/52))
- Remove properties from `identify` and `alias` ([#55](https://github.com/PostHog/posthog-android/pull/55))

## 3.0.0-beta.2 - 2023-10-20

- Keep trying to flush events till the device is connected ([#54](https://github.com/PostHog/posthog-android/pull/54))

## 3.0.0-beta.1 - 2023-10-18

- Registered keys are cached in the disk preferences ([#51](https://github.com/PostHog/posthog-android/pull/51))

## 3.0.0-alpha.8 - 2023-10-12

- SDK only sends the `$feature_flag_called` event once per flag ([#47](https://github.com/PostHog/posthog-android/pull/47))
- Groups are cached in the disk ([#48](https://github.com/PostHog/posthog-android/pull/48))

## 3.0.0-alpha.7 - 2023-10-10

- isFeatureEnabled now returns true if multivariant flag ([#42](https://github.com/PostHog/posthog-android/pull/42))
- getFeatureFlagPayload returns non strigified JSON ([#44](https://github.com/PostHog/posthog-android/pull/44))

## 3.0.0-alpha.6 - 2023-10-06

- Upsert flags when loading feature flags with computed errors ([#38](https://github.com/PostHog/posthog-android/pull/38))
- `$active_feature_flags` event should filter non active flags ([#41](https://github.com/PostHog/posthog-android/pull/41))

## 3.0.0-alpha.5 - 2023-10-04

- Does not report screen events if there's no title ([#32](https://github.com/PostHog/posthog-android/pull/32))
- Add `distinctId()` getter to the Public API ([#33](https://github.com/PostHog/posthog-android/pull/33))
- Add compatibility to Java 8 bytecode (previously Java 11+) ([#37](https://github.com/PostHog/posthog-android/pull/37))

## 3.0.0-alpha.4 - 2023-10-03

- Fixed small issues after code review

## 3.0.0-alpha.3 - 2023-10-02

- Added many tests and fixed small issues

## 3.0.0-alpha.2 - 2023-09-27

- Fix permission check for Network status ([commit](https://github.com/PostHog/posthog-android/commit/57b9626a745a37a9c92437529ba9eaf308b03771))

## 3.0.0-alpha.1 - 2023-09-26

- Next major of the Android SDK rewritten in Kotlin
- Just testing the release automation

## 2.0.3 - 2023-01-30

- Feature flags will be sent with payloads by default for capture and screen events.

## 2.0.2 - 2023-02-21

- Revert: Feature flags will be sent with payloads by default. Default Options will be properly applied

## 2.0.1 - 2023-01-30

- Feature flags will be sent with payloads by default. Default Options will be properly applied

## 2.0.0 - 2022-08-29

- Add support for groups, simplefeature flags, and multivariate feature flags

## 1.1.2 - 2021-03-11

- Fix NullPointerException in PostHogActivityLifecycleCallbacks
Expand Down
Loading
Loading