-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate published API to Kotlin (close #561)
* Migrate the public API to Kotlin (#1) * Rebase for Android tracker v4.2 changes * Translate Controllers * Translate entity folder * Translate Emitter, Gdpr, and GlobalContext Configs * Tidy up remaining Config classes * Add stuff to build.gradle files * Compile both kotlin and java * Add 'public' modifier to various things * Make Gdpr properties nullable * Convert util to kotlin * Convert payload classes * Be strict about Payload Map types * Translate Tracker stuff * Remove accidental character * Make Map types in Payload less strict * Translate Emitter classes * Use entrySet() properly * Remove SDJ Precondition * Update all changes from Android v4.1 * Convert Event classes to Kotlin * Fix tests * Don't test for builders null handling * Translate network classes * Translate global context stuff * Translate Snowplow class * Add new Kotlin demo (doesn't run) * Configure Kotlin demo app * Move public configuration classes to Snowplow package * Distinguish between the demo apps * Prepare for 0.1.0 release * Restore MessageNotificationTrigger enum * Fix Kotlin demo * Restore original snowplow-android-tracker repo links * Restore old version numbers * Restore CHANGELOG * Remove 'Kotlin' from README Bump dokka dependency
- Loading branch information
Showing
272 changed files
with
6,871 additions
and
6,550 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 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,5 @@ | ||
include ':snowplow-tracker' | ||
include ':snowplow-demo-app' | ||
include ':snowplow-demo-java' | ||
include ':snowplow-demo-kotlin' | ||
|
||
project(":snowplow-tracker").name = "snowplow-android-tracker" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
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
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions
11
...-demo-app/src/main/res/values/strings.xml → ...demo-java/src/main/res/values/strings.xml
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
File renamed without changes.
File renamed without changes.
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 @@ | ||
/build |
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,44 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'org.jetbrains.kotlin.android' | ||
} | ||
|
||
android { | ||
namespace 'com.snowplowanalytics.snowplowdemokotlin' | ||
compileSdkVersion 32 | ||
|
||
defaultConfig { | ||
applicationId 'com.snowplowanalytics.snowplowdemokotlin' | ||
minSdkVersion 24 | ||
targetSdkVersion 32 | ||
versionCode 1 | ||
versionName '1.0' | ||
|
||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation 'androidx.core:core-ktx:1.7.0' | ||
implementation 'androidx.appcompat:appcompat:1.5.1' | ||
implementation 'com.google.android.material:material:1.6.0' | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation project(':snowplow-android-tracker') | ||
implementation 'androidx.preference:preference:1.1.1' | ||
implementation 'androidx.browser:browser:1.3.0' | ||
} |
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
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,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.snowplowanalytics.snowplowdemokotlin" > | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
|
||
<!--Enable the permissions below for getting users geographical location.--> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
|
||
<application | ||
android:usesCleartextTraffic="true" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher_snowplow" | ||
android:label="@string/app_name" | ||
android:fullBackupContent="false" | ||
android:networkSecurityConfig="@xml/network_security_config" | ||
android:theme="@style/AppTheme" | ||
> | ||
<activity | ||
android:name=".MainActivity" | ||
android:screenOrientation="portrait" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".Demo" | ||
android:label="@string/title_activity_demo" | ||
android:screenOrientation="portrait"> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Oops, something went wrong.