Skip to content

Commit

Permalink
Merge pull request #845 from mixpanel/zihe-revert-minSDK
Browse files Browse the repository at this point in the history
Set minSdk to 21, targetSdk to 34, Gradle upgraded to 8.1.4 and add a demo app!
  • Loading branch information
zihejia authored Sep 18, 2024
2 parents 68c1cf1 + cb6c94a commit 5e65538
Show file tree
Hide file tree
Showing 52 changed files with 1,523 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
20 changes: 10 additions & 10 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@ name: Mixpanel Android Pull Request and master branch CI

on:
push:
branches: [ master, 6.0.0.beta ]
branches: [ master ]
pull_request:
branches: [ master, 6.0.0.beta ]
branches: [ master ]

jobs:
build:
runs-on: macos-11
runs-on: macos-13
steps:
- name: Checkout the code
uses: actions/checkout@v2
uses: actions/checkout@v4.1.7
- name: Run Unit test
uses: reactivecircus/android-emulator-runner@v2.20.0
uses: reactivecircus/android-emulator-runner@v2.32.0
with:
api-level: 30
profile: Nexus 6
api-level: 34
profile: Nexus 5X
arch: x86_64
script: ./gradlew createDebugCoverageReport
- name: Lint
run: ./gradlew lint
- name: Upload test report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: Unit Test Report
path: /Users/runner/work/mixpanel-android/mixpanel-android/build/reports/androidTests/connected
- name: Upload test coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Test Coverage Report
path: /Users/runner/work/mixpanel-android/mixpanel-android/build/reports/coverage/debug/
- name: Upload lint report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Lint Report
path: /Users/runner/work/mixpanel-android/mixpanel-android/build/reports/lint-results.html
Expand Down
4 changes: 2 additions & 2 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
</natures>
<filteredResources>
<filter>
<id>1633027344058</id>
<id>1724996348260</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
Expand Down
4 changes: 2 additions & 2 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=
arguments=--init-script /var/folders/g5/x7ydv84x5znc08rnwr1w7_l40000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/g5/x7ydv84x5znc08rnwr1w7_l40000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
java.home=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#

## [v7.5.3](https://github.com/mixpanel/mixpanel-android/tree/v7.5.3) (2024-09-06)

### Enhancements

- upgrade to gradle 8+ and add a demo app [\#840](https://github.com/mixpanel/mixpanel-android/pull/840)
- Add SessionReplayBroadcastReceiver [\#838](https://github.com/mixpanel/mixpanel-android/pull/838)

#

## [v7.5.2](https://github.com/mixpanel/mixpanel-android/tree/v7.5.2) (2024-04-16)

### Enhancements
Expand Down Expand Up @@ -1621,6 +1630,8 @@ events being sent.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Latest Version

##### _April 15, 2024_ - [v7.5.2](https://github.com/mixpanel/mixpanel-android/releases/tag/v7.5.2)
##### _September 06, 2024_ - [v7.5.3](https://github.com/mixpanel/mixpanel-android/releases/tag/v7.5.3)

# Table of Contents

Expand Down
50 changes: 28 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,37 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'


group = GROUP
version = VERSION_NAME

android {
compileSdkVersion 33

namespace "com.mixpanel.android"
compileSdk 34
buildToolsVersion = "34.0.0"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

lintOptions {
abortOnError false
}

defaultConfig {
minSdkVersion 14
targetSdkVersion 33
minSdk 21
targetSdk 34
multiDexEnabled true
android.buildFeatures.buildConfig true
testApplicationId "com.mixpanel.android.mpmetrics"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'proguard.txt'
Expand All @@ -49,8 +52,6 @@ android {
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}


}
buildTypes {
debug{
Expand All @@ -76,22 +77,27 @@ allprojects {
}
}

// Note- *all* dependencies are marked as optional in our final
// pom! If you need a transitive dependency in the library, you'll
// have to change the bit in uploadArchives that marks all dependencies as optional.
configurations.all {
resolutionStrategy {
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22"
}
}

dependencies {
implementation "androidx.annotation:annotation:1.1.0"

implementation "androidx.annotation:annotation:1.8.2"
implementation 'androidx.core:core:1.13.1'
// AndroidJUnitRunner and JUnit Rules
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:core:1.4.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.ext:truth:1.4.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:core:1.6.1'
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test:rules:1.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.ext:truth:1.6.0'
androidTestImplementation "org.mockito:mockito-android:2.25.1"
androidTestUtil 'androidx.test:orchestrator:1.4.0'
androidTestUtil 'androidx.test:orchestrator:1.5.0'
testImplementation "org.mockito:mockito-core:2.25.1"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}

apply from: rootProject.file('maven.gradle')
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=7.5.4
VERSION_NAME=8.0.0-SNAPSHOT

POM_PACKAGING=aar
GROUP=com.mixpanel.android
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
Loading

0 comments on commit 5e65538

Please sign in to comment.