Skip to content

Commit

Permalink
fix: add consumer proguard rules for serialization; update gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Aug 16, 2024
1 parent dbe1906 commit 5d3fb2f
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/captures
.externalNativeBuild
.cxx
.kotlin
4 changes: 4 additions & 0 deletions analytics-connector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ android {
sourceCompatibility 1.8
targetCompatibility 1.8
}
kotlinOptions {
jvmTarget = '1.8'
}
namespace 'com.amplitude.analytics.connector'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions analytics-connector/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amplitude.analytics">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ buildscript {
}

dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:8.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.10"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
classpath "org.jlleitschuh.gradle:ktlint-gradle:10.1.0"
Expand Down
23 changes: 13 additions & 10 deletions example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'

android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
compileSdkVersion 34

defaultConfig {
applicationId "com.amplitude.exampleapp"
minSdkVersion 17
targetSdkVersion 30
minSdkVersion 19
targetSdkVersion 34
versionCode 1
versionName "1.0"

Expand All @@ -21,13 +21,14 @@ android {
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
kotlinOptions {
jvmTarget = '17'
}
namespace 'com.amplitude.exampleapp'
}

dependencies {
Expand All @@ -39,10 +40,12 @@ dependencies {
implementation 'androidx.navigation:navigation-fragment:2.1.0'
implementation 'androidx.navigation:navigation-ui:2.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.amplitude:android-sdk:2.30.0'
implementation 'com.amplitude:android-sdk:2.39.8'
// implementation("com.amplitude:experiment-android-client:0.0.4")
implementation project(path: ':sdk')
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Expand Down
6 changes: 3 additions & 3 deletions example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amplitude.exampleapp">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name=".ExampleApplication"
Expand All @@ -13,7 +12,8 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

import android.app.Application;

import com.amplitude.api.Amplitude;
import com.amplitude.api.AmplitudeAnalyticsProvider;
import com.amplitude.api.AmplitudeClient;
import com.amplitude.api.AmplitudeUserProvider;
import com.amplitude.experiment.Experiment;
import com.amplitude.experiment.ExperimentClient;
import com.amplitude.experiment.ExperimentConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.os.Bundle;
import android.widget.TextView;

import com.amplitude.experiment.Experiment;
import com.amplitude.experiment.ExperimentClient;
import com.amplitude.experiment.Variant;
import com.google.android.material.bottomnavigation.BottomNavigationView;
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=amplitude
POM_DEVELOPER_NAME=Amplitude
POM_DEVELOPER_EMAIL=[email protected]
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
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-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
4 changes: 4 additions & 0 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ android {
sourceCompatibility 1.8
targetCompatibility 1.8
}
kotlinOptions {
jvmTarget = '1.8'
}
namespace 'com.amplitude.experiment'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions sdk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amplitude.experiment">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down

0 comments on commit 5d3fb2f

Please sign in to comment.