From 76a29bf8d4e01646b450844d3a7dfb1069f735d7 Mon Sep 17 00:00:00 2001 From: Qingzhuo Zhen Date: Wed, 11 May 2022 22:32:31 -0700 Subject: [PATCH] fix: fix android aar issue --- android/build.gradle | 11 +++++++---- build.gradle | 3 +++ common-jvm/build.gradle | 1 + common/build.gradle | 6 +++++- event-bridge/build.gradle | 1 + gradle.properties | 1 + id/build.gradle | 1 + samples/java-android-app/build.gradle | 1 + samples/kotlin-android-app/build.gradle | 1 + 9 files changed, 21 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index aca7ee82..fc9669a4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'com.kezong.fat-aar' } ext { @@ -51,10 +52,12 @@ android { } dependencies { - api project(':common') - api project(':common-android') - api project(':id') - api project(':core') + embed project(':common') + embed project(':common-jvm') + embed project(':common-android') + embed project(':core') + embed project(':event-bridge') + embed project(':id') implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2' diff --git a/build.gradle b/build.gradle index 60091186..b3345c86 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { classpath "org.jlleitschuh.gradle:ktlint-gradle:10.2.1" classpath "io.github.gradle-nexus:publish-plugin:1.1.0" classpath "de.mannodermaus.gradle.plugins:android-junit5:1.8.2.0" + classpath 'com.github.kezong:fat-aar:1.3.8' } } @@ -34,6 +35,8 @@ allprojects{ apply plugin: "org.jlleitschuh.gradle.ktlint" apply plugin: 'org.jetbrains.dokka' + + group GROUP } tasks.dokkaHtmlMultiModule.configure { diff --git a/common-jvm/build.gradle b/common-jvm/build.gradle index f72e7a5a..2f66ae18 100644 --- a/common-jvm/build.gradle +++ b/common-jvm/build.gradle @@ -14,6 +14,7 @@ test { dependencies { api project(":common") + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" testImplementation platform("org.junit:junit-bom:5.7.2") testImplementation "org.junit.jupiter:junit-jupiter" } diff --git a/common/build.gradle b/common/build.gradle index a1a673c9..f6ffca39 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -6,4 +6,8 @@ plugins { java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 -} \ No newline at end of file +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" +} diff --git a/event-bridge/build.gradle b/event-bridge/build.gradle index d59edf81..64afcd9c 100644 --- a/event-bridge/build.gradle +++ b/event-bridge/build.gradle @@ -11,6 +11,7 @@ test { useJUnitPlatform() } dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" testImplementation platform("org.junit:junit-bom:5.7.2") testImplementation "org.junit.jupiter:junit-jupiter" } diff --git a/gradle.properties b/gradle.properties index 035a47aa..ce29e365 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,3 +18,4 @@ POM_DEVELOPER_ORG=Amplitude POM_DEVELOPER_ORG_URL=https://amplitude.com/ RELEASE_REPOSITORY_URL=https://oss.sonatype.org/service/local/staging/deploy/maven2/ SNAPSHOT_REPOSITORY_URL=https://oss.sonatype.org/content/repositories/snapshots/ +GROUP=com.amplitude diff --git a/id/build.gradle b/id/build.gradle index b01b43ed..7280f7fa 100644 --- a/id/build.gradle +++ b/id/build.gradle @@ -13,6 +13,7 @@ test { } dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" testImplementation platform("org.junit:junit-bom:5.7.2") testImplementation "org.junit.jupiter:junit-jupiter" } diff --git a/samples/java-android-app/build.gradle b/samples/java-android-app/build.gradle index bbc700fe..6ea67fd0 100644 --- a/samples/java-android-app/build.gradle +++ b/samples/java-android-app/build.gradle @@ -36,6 +36,7 @@ android { } dependencies { + implementation project(':core') implementation project(':android') implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1' diff --git a/samples/kotlin-android-app/build.gradle b/samples/kotlin-android-app/build.gradle index 6f46a9e2..02e7e45e 100644 --- a/samples/kotlin-android-app/build.gradle +++ b/samples/kotlin-android-app/build.gradle @@ -39,6 +39,7 @@ android { } dependencies { + implementation project(':core') implementation project(':android') implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1'