forked from PostHog/posthog-flutter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to the new SDKs (PostHog#70)
- Loading branch information
1 parent
15e2dc0
commit 0bd822f
Showing
82 changed files
with
2,132 additions
and
1,336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ | |
.DS_Store | ||
/build | ||
/captures | ||
.cxx | ||
|
||
/.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,71 @@ | ||
group 'com.posthog.posthog_flutter' | ||
version '1.0-SNAPSHOT' | ||
|
||
buildscript { | ||
ext.kotlin_version = '1.8.10' | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:7.4.2' | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
} | ||
} | ||
|
||
rootProject.allprojects { | ||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
|
||
android { | ||
compileSdk 33 | ||
|
||
// Conditional for compatibility with AGP <4.2. | ||
if (project.android.hasProperty("namespace")) { | ||
namespace 'com.posthog.posthog_flutter' | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion 19 | ||
compileSdkVersion 33 | ||
|
||
ndk { | ||
// Flutter does not currently support building for x86 Android (See Issue 9253). | ||
abiFilters("armeabi-v7a", "x86_64", "arm64-v8a") | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
lintOptions { | ||
disable 'InvalidPackage' | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
languageVersion = "1.6" | ||
apiVersion = "1.6" | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
test.java.srcDirs += 'src/test/kotlin' | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion 21 | ||
} | ||
|
||
dependencies { | ||
api 'com.posthog.android:posthog:2.0.3' | ||
testImplementation 'org.jetbrains.kotlin:kotlin-test' | ||
testImplementation 'org.mockito:mockito-core:5.0.0' | ||
implementation 'com.posthog:posthog-android:3.0.1' | ||
} | ||
|
||
testOptions { | ||
unitTests.all { | ||
useJUnitPlatform() | ||
|
||
testLogging { | ||
events "passed", "skipped", "failed", "standardOut", "standardError" | ||
outputs.upToDateWhen { false } | ||
showStandardStreams = true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
|
||
org.gradle.jvmargs=-Xmx4G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.posthog.posthog_flutter"> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
</manifest> |
Oops, something went wrong.