Skip to content

Commit

Permalink
feat: setup common modules (#11)
Browse files Browse the repository at this point in the history
* feat: setup common modules

* patch: fix build
  • Loading branch information
qingzhuozhen authored Mar 17, 2022
1 parent e72c608 commit 4a4ff66
Show file tree
Hide file tree
Showing 21 changed files with 640 additions and 74 deletions.
2 changes: 2 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ android {
}

dependencies {
implementation project(':common')
implementation project(':common-android')
implementation project(':core')
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.amplitude.android.utilities

import com.amplitude.common.Logger
import com.amplitude.common.android.AndroidLogger
import com.amplitude.core.Amplitude
import com.amplitude.core.LoggerProvider

class AndroidLoggerProvider() : LoggerProvider {
override fun getLogger(amplitude: Amplitude): Logger {
return AndroidLogger()
}
}
39 changes: 39 additions & 0 deletions common-android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
}

android {
compileSdk 31

defaultConfig {
minSdk 16
targetSdk 31
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

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 project(":common")
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
}
Empty file.
21 changes: 21 additions & 0 deletions common-android/proguard-rules.pro
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
5 changes: 5 additions & 0 deletions common-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amplitude.common.android">

</manifest>
Loading

0 comments on commit 4a4ff66

Please sign in to comment.