Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scripts/maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ publishing {
}

task stubJavadoc(type: Jar) {
classifier = 'javadoc'
archiveClassifier = 'javadoc'
}
}
repositories {
Expand Down
13 changes: 10 additions & 3 deletions Tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
}
val xcFramework = XCFramework()
Expand Down Expand Up @@ -67,13 +67,14 @@ kotlin {
}

android {
compileSdk = 31
namespace = "com.mparticle.tests"
compileSdk = 33
sourceSets["main"].manifest.srcFile("helpers/AndroidManifest.xml")
sourceSets["androidTest"].java.srcDirs("CommonTests")

defaultConfig {
minSdk= 14
targetSdk = 31
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
Expand All @@ -82,6 +83,12 @@ android {
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}

val installTestPods by tasks.creating(Exec::class.java) {
workingDir = project.file("helpers/XCodeTest")
setCommandLine("pod")
Expand Down
11 changes: 9 additions & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
apply(from = "../.scripts/maven.gradle")

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
mavenPublication {
artifactId = project.name
Expand Down Expand Up @@ -58,7 +58,7 @@ kotlin {
}

android {
namespace = "testing"
namespace = "com.mparticle.api"
compileSdk = 33
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")

Expand All @@ -72,6 +72,13 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
// implementation("androidx.lifecycle:lifecycle-common:2.2.0")
}
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.gradle.internal.impldep.org.apache.commons.io.FileUtils.copyDirectory
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin

allprojects {
repositories {
Expand Down Expand Up @@ -30,13 +31,12 @@ subprojects {
val appleSDKTempDirPath = "${project.rootDir.absolutePath}/.sdks/apple-testing"

if (File(appleSDKTempDirPath).exists()) {
project.exec {
commandLine = "rm -rf $appleSDKTempDirPath".split(" ")
}
File(appleSDKTempDirPath).deleteRecursively()
}

project.exec {
commandLine = "cp -r ${project.rootDir.absolutePath}/.sdks/apple $appleSDKTempDirPath".split(" ")
commandLine = listOf("cp", "-r", "${project.rootDir.absolutePath}/.sdks/apple", appleSDKTempDirPath)
isIgnoreExitValue = false
}

val addTestingHeadersToAppleSDK by tasks.creating {
Expand Down
3 changes: 0 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
kotlin.code.style=official
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
kotlin.mpp.enableCompatibilityMetadataVariant=true
kotlin.mpp.enableCInteropCommonization=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx5120m
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 11 additions & 3 deletions mocking/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
apply(from = "../.scripts/maven.gradle")

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
mavenPublication {
artifactId = "mocking"
Expand Down Expand Up @@ -64,18 +64,26 @@ kotlin {
}

android {
compileSdk = 31
namespace = "com.mparticle.mocking"
compileSdk = 33
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 14
targetSdk = 31
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
implementation("androidx.lifecycle:lifecycle-common:2.5.0")
}
Expand Down
8 changes: 7 additions & 1 deletion models/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories {
val xcFramework = XCFramework()

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
mavenPublication {
artifactId = project.name
Expand Down Expand Up @@ -65,3 +65,9 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}
14 changes: 7 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ rootProject.name = "sdk-multiplatform-test"
include("api", "mocking", "models", "testing", "Tests")//, "braze-kit")
includeBuild(".sdks/android") {
dependencySubstitution {
substitute(module("group:android-core")).with(project(":android-core"))
substitute(module("com.mparticle:android-core:+")).with(project(":android-core"))
substitute(module("group:android-core")).using(project(":android-core"))
substitute(module("com.mparticle:android-core:+")).using(project(":android-core"))
}
}
pluginManagement {
Expand All @@ -13,15 +13,15 @@ pluginManagement {
mavenCentral()
}
plugins {
id("com.android.library") version("7.3.1")
kotlin("multiplatform") version ("1.9.0")
kotlin("plugin.serialization") version ("1.6.21")
kotlin("native.cocoapods") version ("1.6.21")
id("com.android.library") version("8.1.0")
kotlin("multiplatform") version ("1.9.20")
kotlin("plugin.serialization") version ("1.9.20")
kotlin("native.cocoapods") version ("1.9.20")
}
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "com.android" || requested.id.name == "kotlin-android-extensions") {
useModule("com.android.tools.build:gradle:7.3.1")
useModule("com.android.tools.build:gradle:8.1.0")
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
apply(from = "../.scripts/maven.gradle")

kotlin {
android {
androidTarget {
publishLibraryVariants("release")
mavenPublication {
artifactId = "testing"
Expand Down Expand Up @@ -78,6 +78,13 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
implementation("androidx.lifecycle:lifecycle-common:2.5.0")
}