diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index a9d1dc79..00000000 --- a/android/build.gradle +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 28/10/21, 7:56 PM Last modified: 28/10/21, 7:56 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -apply from : "$projectDir/../dependencies.gradle" - -android { - compileSdk library.target_sdk - buildFeatures{ - buildConfig true - } - defaultConfig { - minSdk library.min_sdk - targetSdk library.target_sdk - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - - //for code access - buildConfigField "String", "LIBRARY_VERSION_NAME", library.version_name - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } - kotlinOptions { - jvmTarget = '17' - } - testOptions { - unitTests { - includeAndroidResources = true - } - } - namespace 'com.rudderstack.android' -} - -dependencies { - - implementation deps.kotlinCore -// implementation 'androidx.appcompat:appcompat:1.3.1' -// implementation 'com.google.android.material:material:1.4.0' - //dependency on work manager - //core kotlin project - api project(path: projects.core) - api project(path: projects.models) - api project(path: projects.repository) - compileOnly project(path: projects.jackson_rudder_adapter) - compileOnly project(path: projects.gson_rudder_adapter) - compileOnly project(path: projects.moshi_rudder_adapter) - compileOnly project(path: projects.json_rudder_adapter) - - //work manager - //user needs to provide dependency, in case work manager is used - compileOnly deps.work - compileOnly deps.workMultiprocess - - testImplementation project(path: projects.jackson_rudder_adapter) - testImplementation project(path: projects.gson_rudder_adapter) - testImplementation project(path: projects.moshi_rudder_adapter) - testImplementation project(path: projects.json_rudder_adapter) - testImplementation(project(path: projects.test_common)) - testImplementation deps.androidXTest - testImplementation deps.androidXTest - testImplementation deps.hamcrest - testImplementation deps.mockito - testImplementation deps.mockito_kotlin - testImplementation deps.mockk - testImplementation deps.mockk_agent_jvm - testImplementation deps.awaitility - testImplementation deps.robolectric - implementation deps.androidXTestExtJunitKtx - implementation deps.androidXTestRules - testImplementation deps.junit - testImplementation deps.workTest - - androidTestImplementation deps.androidXTestExtJunitKtx -} -apply from: rootProject.file('gradle/artifacts-aar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/android/build.gradle.kts b/android/build.gradle.kts new file mode 100644 index 00000000..cdb79256 --- /dev/null +++ b/android/build.gradle.kts @@ -0,0 +1,89 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + + namespace = "com.rudderstack.android" + + compileSdk = RudderstackBuildConfig.Android.COMPILE_SDK + + buildFeatures { + buildFeatures { + buildConfig = true + } + } + defaultConfig { + minSdk = RudderstackBuildConfig.Android.MIN_SDK + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + buildConfigField( + "String", + "LIBRARY_VERSION_NAME", + RudderstackBuildConfig.Version.VERSION_NAME + ) + } + + buildTypes { + named("release") { + isMinifyEnabled = false + setProguardFiles( + listOf( + getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" + ) + ) + } + } + compileOptions { + sourceCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + targetCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + } + kotlinOptions { + jvmTarget = RudderstackBuildConfig.Build.JVM_TARGET + javaParameters = true + } + testOptions { + unitTests { + this.isIncludeAndroidResources = true + } + } +} + +dependencies { + implementation(libs.android.core.ktx) + api(project(":core")) + api(project(":models")) + api(project(":repository")) + + compileOnly(project(":jacksonrudderadapter")) + compileOnly(project(":gsonrudderadapter")) + compileOnly(project(":moshirudderadapter")) + compileOnly(project(":rudderjsonadapter")) + compileOnly(libs.work) + compileOnly(libs.work.multiprocess) + + testImplementation(project(":jacksonrudderadapter")) + testImplementation(project(":gsonrudderadapter")) + testImplementation(project(":moshirudderadapter")) + testImplementation(project(":rudderjsonadapter")) + testImplementation(project(":libs:test-common")) + testImplementation(libs.android.x.test) + testImplementation(libs.android.x.testrules) + testImplementation(libs.android.x.test.ext.junitktx) + testImplementation(libs.awaitility) + testImplementation(libs.hamcrest) + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) + testImplementation(libs.mockk.agent) + testImplementation(libs.robolectric) + testImplementation(libs.work.test) + + androidTestImplementation(libs.android.x.test.ext.junitktx) +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-aar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/build.gradle b/build.gradle deleted file mode 100644 index a690abbb..00000000 --- a/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - ext { - compose_version = '1.4.8' - } - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.2.2' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} -plugins { - id("io.github.gradle-nexus.publish-plugin") version "1.3.0" - id 'org.jetbrains.kotlin.android' version '1.8.22' apply false - id 'org.jetbrains.kotlin.jvm' version '1.8.22' apply false -} - -task clean(type: Delete) { - delete rootProject.buildDir -} -apply from: rootProject.file('gradle/promote.gradle') -apply from: rootProject.file('gradle/codecov.gradle') -subprojects { - group GROUP - version getVersionName(VERSION_NAME) -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..a8382c80 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,28 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + extra["compose_version"] = RudderstackBuildConfig.Kotlin.COMPILER_EXTENSION_VERSION + repositories { + google() + mavenCentral() + } + dependencies { + classpath(libs.gradle) + classpath(libs.kotlin.gradle.plugin) + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle.kts files + } +} + +plugins { + alias(libs.plugins.gradle.nexus.publish) + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.kotlin.jvm) apply false +} + +subprojects { + version = properties[RudderstackBuildConfig.ReleaseInfo.VERSION_NAME].toString() + group = properties[RudderstackBuildConfig.ReleaseInfo.GROUP_NAME].toString() +} + +apply(from = rootProject.file("gradle/promote.gradle")) +apply(from = rootProject.file("gradle/codecov.gradle")) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 00000000..18326b84 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + `kotlin-dsl` + id("java-library") +} +repositories { + gradlePluginPortal() +} diff --git a/buildSrc/src/main/kotlin/RudderstackBuildConfig.kt b/buildSrc/src/main/kotlin/RudderstackBuildConfig.kt new file mode 100644 index 00000000..9c206a75 --- /dev/null +++ b/buildSrc/src/main/kotlin/RudderstackBuildConfig.kt @@ -0,0 +1,28 @@ +import org.gradle.api.JavaVersion + +object RudderstackBuildConfig { + + object Build { + val JAVA_VERSION = JavaVersion.VERSION_17 + val JVM_TARGET = "17" + } + + object Android { + val COMPILE_SDK = 34 + val MIN_SDK = 19 + val TARGET_SDK = COMPILE_SDK + } + + object Version { + val VERSION_NAME = "\"2.0\"" + } + + object Kotlin { + val COMPILER_EXTENSION_VERSION = "1.4.8" + } + + object ReleaseInfo { + val VERSION_NAME = "" + val GROUP_NAME = "" + } +} diff --git a/core/build.gradle b/core/build.gradle deleted file mode 100644 index 58ec8218..00000000 --- a/core/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 18/10/21, 12:09 PM Last modified: 18/10/21, 12:09 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'java-library' - id 'kotlin' -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -compileKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -compileTestKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} - -apply from : "$projectDir/../dependencies.gradle" - -dependencies { -// api project(path: ':repository') - api project(path: ':rudderjsonadapter') - api project(path: ':models') - api project(path: ':web') - - -// api(project(":web")) -// implementation(project(":rudderjsonadapter")) -// implementation(project(":repository")) - testImplementation 'junit:junit:4.+' - testImplementation deps.hamcrest - testImplementation deps.mockito - testImplementation deps.mockito_kotlin - testImplementation deps.awaitility - testImplementation deps.mockk - - testImplementation(project(path: ':moshirudderadapter')) - testImplementation(project(path: projects.test_common)) - testImplementation(project(path: ':gsonrudderadapter')) - testImplementation(project(path: ':jacksonrudderadapter')) -} -apply from: "$projectDir/../gradle/artifacts-jar.gradle" -apply from: "$projectDir/../gradle/mvn-publish.gradle" -apply from: "$projectDir/../gradle/codecov.gradle" diff --git a/core/build.gradle.kts b/core/build.gradle.kts new file mode 100644 index 00000000..f5d77026 --- /dev/null +++ b/core/build.gradle.kts @@ -0,0 +1,26 @@ +plugins { + id("java-library") + id("kotlin") +} + +dependencies { + api(project(":rudderjsonadapter")) + api(project(":models")) + api(project(":web")) + + testImplementation(libs.awaitility) + testImplementation(libs.junit) + testImplementation(libs.hamcrest) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.mockk) + + testImplementation(project(":moshirudderadapter")) + testImplementation(project(":libs:test-common")) + testImplementation(project(":gsonrudderadapter")) + testImplementation(project(":jacksonrudderadapter")) +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-jar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..348acd13 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,58 @@ +[versions] +android-core-ktx = "1.10.1" +gradle = "8.2.2" +kotlin = "1.8.22" +mockk = "1.13.3" +work = "2.9.0" +gson = "2.8.8" +jackson-core = "2.13.3" +jackson-module = "2.13.3" +moshi = "1.13.0" +mockito-kotlin = "4.0.0" +mockito = "4.0.0" +android-x-test = "1.4.0" +android-x-testrules = "1.4.0" +android-x-test-ext-junitktx = "1.1.3" +android-x-testrunner = "1.4.0" +android-x-annotation = "1.6.0" +android-x-test-espresso = "3.5.1" +hamcrest = "2.2" +awaitility = "4.1.0" +robolectric = "4.12.1" +junit = "4.+" +json-assert = "1.5.0" +gradle-nexus-publish = "1.3.0" + +[libraries] +android-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "android-core-ktx" } +gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" } +kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" } +mockk-agent = { group = "io.mockk", name = "mockk-agent-jvm", version.ref = "mockk" } +work = { group = "androidx.work", name = "work-runtime", version.ref = "work" } +work-multiprocess = { group = "androidx.work", name = "work-multiprocess", version.ref = "work" } +work-test = { group = "androidx.work", name = "work-testing", version.ref = "work" } +gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } +jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson-core" } +jackson-module = { group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version.ref = "jackson-module" } +moshi-kotlin = { group = "com.squareup.moshi", name = "moshi-kotlin", version.ref = "moshi" } +moshi-adapters = { group = "com.squareup.moshi", name = "moshi-adapters", version.ref = "moshi" } +moshi = { group = "com.squareup.moshi", name = "moshi", version.ref = "moshi" } +mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockito-kotlin" } +mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" } +android-x-test = { group = "androidx.test", name = "core", version.ref = "android-x-test" } +android-x-testrules = { group = "androidx.test", name = "rules", version.ref = "android-x-testrules" } +android-x-test-ext-junitktx = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "android-x-test-ext-junitktx" } +android-x-test-espresso = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "android-x-test-espresso" } +android-x-annotation = { group = "androidx.annotation", name = "annotation", version.ref = "android-x-annotation" } +android-x-testrunner = { group = "androidx.test", name = "runner", version.ref = "android-x-testrunner" } +hamcrest = { group = "org.hamcrest", name = "hamcrest", version.ref = "hamcrest" } +awaitility = { group = "org.awaitility", name = "awaitility", version.ref = "awaitility" } +robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" } +junit = { group = "junit", name = "junit", version.ref = "junit" } +json-assert = { group = "org.skyscreamer", name = "jsonassert", version.ref = "json-assert" } + +[plugins] +gradle-nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "gradle-nexus-publish" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } diff --git a/gsonrudderadapter/build.gradle b/gsonrudderadapter/build.gradle deleted file mode 100644 index 528c5677..00000000 --- a/gsonrudderadapter/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'java-library' - id 'kotlin' -} -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -compileKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -compileTestKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} - -apply from : "$projectDir/../dependencies.gradle" - - - -dependencies { - - implementation(project(path: ":rudderjsonadapter")) - api deps.gson - - testImplementation deps.hamcrest - testImplementation 'junit:junit:4.+' -} -apply from: "$projectDir/../gradle/artifacts-jar.gradle" -apply from: "$projectDir/../gradle/mvn-publish.gradle" -apply from: "$projectDir/../gradle/codecov.gradle" diff --git a/gsonrudderadapter/build.gradle.kts b/gsonrudderadapter/build.gradle.kts new file mode 100644 index 00000000..50f439a9 --- /dev/null +++ b/gsonrudderadapter/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + id("java-library") + id("kotlin") +} + +dependencies { + implementation(project(":rudderjsonadapter")) + api(libs.gson) + testImplementation(libs.junit) + testImplementation(libs.hamcrest) + +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-jar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/jacksonrudderadapter/build.gradle b/jacksonrudderadapter/build.gradle deleted file mode 100644 index c64dce09..00000000 --- a/jacksonrudderadapter/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'java-library' - id 'kotlin' -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -compileKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -compileTestKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -apply from : "$projectDir/../dependencies.gradle" - - -dependencies { - - implementation(project(path: ":rudderjsonadapter")) - api deps.jackson - api deps.jacksonKotlin - - testImplementation deps.hamcrest - testImplementation 'junit:junit:4.+' -} -apply from: rootProject.file('gradle/artifacts-jar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/jacksonrudderadapter/build.gradle.kts b/jacksonrudderadapter/build.gradle.kts new file mode 100644 index 00000000..9d891d9b --- /dev/null +++ b/jacksonrudderadapter/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id("java-library") + id("kotlin") +} + +dependencies { + implementation(project(":rudderjsonadapter")) + api(libs.jackson.core) + api(libs.jackson.module) + testImplementation(libs.junit) + testImplementation(libs.hamcrest) + +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-jar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/libs/navigationplugin/build.gradle.kts b/libs/navigationplugin/build.gradle.kts index 3d8dd2b3..e9d2864a 100644 --- a/libs/navigationplugin/build.gradle.kts +++ b/libs/navigationplugin/build.gradle.kts @@ -44,12 +44,12 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + targetCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION } kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + jvmTarget = RudderstackBuildConfig.Build.JAVA_VERSION.toString() javaParameters = true } namespace = "com.rudderstack.android.navigationplugin" diff --git a/libs/test-common/build.gradle.kts b/libs/test-common/build.gradle.kts index 350de790..28cc599e 100644 --- a/libs/test-common/build.gradle.kts +++ b/libs/test-common/build.gradle.kts @@ -16,20 +16,16 @@ plugins { id("java-library") id("org.jetbrains.kotlin.jvm") } -val dependencyPath = "${project.projectDir.parentFile.parent}/dependencies.gradle" -apply(from = dependencyPath) -val deps : HashMap by extra -val library : HashMap by extra -val projects : HashMap by extra + java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + targetCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION } tasks.withType().all { kotlinOptions { - jvmTarget = "17" + jvmTarget = RudderstackBuildConfig.Build.JVM_TARGET } } dependencies { - compileOnly(project(projects["core"].toString())) + compileOnly(project(":core")) } diff --git a/models/build.gradle b/models/build.gradle deleted file mode 100644 index b31e0b3c..00000000 --- a/models/build.gradle +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'java-library' - id 'kotlin' -} -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -compileKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -compileTestKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} - -apply from : "$projectDir/../dependencies.gradle" - -dependencies { - - //json parsers as compileOnly just for annotations - compileOnly deps.gson - compileOnly deps.jackson - compileOnly deps.moshi.core - compileOnly deps.moshi.kotlin - compileOnly deps.moshi.adapter - - //test - testImplementation 'junit:junit:4.+' - - testImplementation deps.gson - testImplementation deps.jackson - testImplementation deps.moshi.core - testImplementation deps.moshi.kotlin - testImplementation deps.moshi.adapter - testImplementation deps.jsonAssert - - testImplementation(project(':moshirudderadapter')) - testImplementation(project(':gsonrudderadapter')) - testImplementation(project(':jacksonrudderadapter')) - testImplementation(project(":rudderjsonadapter")) - - testImplementation deps.hamcrest -} -apply from: rootProject.file('gradle/artifacts-jar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/models/build.gradle.kts b/models/build.gradle.kts new file mode 100644 index 00000000..4c979c3b --- /dev/null +++ b/models/build.gradle.kts @@ -0,0 +1,31 @@ +plugins { + id("java-library") + id("kotlin") +} + +dependencies { + compileOnly(libs.gson) + compileOnly(libs.jackson.core) + compileOnly(libs.jackson.module) + compileOnly(libs.moshi) + compileOnly(libs.moshi.kotlin) + compileOnly(libs.moshi.adapters) + + testImplementation(libs.hamcrest) + testImplementation(libs.junit) + testImplementation(libs.gson) + testImplementation(libs.jackson.core) + testImplementation(libs.moshi) + testImplementation(libs.moshi.kotlin) + testImplementation(libs.moshi.adapters) + testImplementation(libs.json.assert) + + testImplementation(project(":moshirudderadapter")) + testImplementation(project(":gsonrudderadapter")) + testImplementation(project(":jacksonrudderadapter")) + testImplementation(project(":rudderjsonadapter")) +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-jar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/moshirudderadapter/build.gradle b/moshirudderadapter/build.gradle deleted file mode 100644 index c6275f30..00000000 --- a/moshirudderadapter/build.gradle +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'java-library' - id 'kotlin' -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -compileKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -compileTestKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} - -apply from : "$projectDir/../dependencies.gradle" - - -dependencies { - - implementation(project(path: ":rudderjsonadapter")) - api deps.moshi.kotlin - api deps.moshi.core - //test - testImplementation deps.hamcrest - testImplementation 'junit:junit:4.+' -} -apply from: rootProject.file('gradle/artifacts-jar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/moshirudderadapter/build.gradle.kts b/moshirudderadapter/build.gradle.kts new file mode 100644 index 00000000..ca059b87 --- /dev/null +++ b/moshirudderadapter/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id("java-library") + id("kotlin") +} + +dependencies { + implementation(project(":rudderjsonadapter")) + api(libs.moshi) + api(libs.moshi.kotlin) + testImplementation(libs.junit) + testImplementation(libs.hamcrest) + +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-jar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/repository/build.gradle b/repository/build.gradle deleted file mode 100644 index b4bb147f..00000000 --- a/repository/build.gradle +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' -} -apply from : "$projectDir/../dependencies.gradle" - -android { - namespace 'com.rudderstack.android.repository' - compileSdk library.target_sdk - - defaultConfig { - minSdk library.min_sdk - targetSdk library.target_sdk - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - kotlinOptions { - jvmTarget = '17' - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } - java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -dependencies { - - testImplementation deps.androidXTestExtJunitKtx - testImplementation deps.androidXTestRules - - testImplementation deps.junit - testImplementation deps.androidXTest - testImplementation deps.hamcrest - testImplementation deps.mockito - testImplementation deps.awaitility - testImplementation deps.robolectric - - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test:rules:1.5.0' - androidTestImplementation deps.androidXTestExtJunitKtx - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} -apply from: rootProject.file('gradle/artifacts-aar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/repository/build.gradle.kts b/repository/build.gradle.kts new file mode 100644 index 00000000..b67dd4b3 --- /dev/null +++ b/repository/build.gradle.kts @@ -0,0 +1,60 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + + namespace = "com.rudderstack.android.repository" + compileSdk = RudderstackBuildConfig.Android.TARGET_SDK + + defaultConfig { + minSdk = RudderstackBuildConfig.Android.MIN_SDK + targetSdk = RudderstackBuildConfig.Android.TARGET_SDK + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + named("release") { + isMinifyEnabled = false + setProguardFiles( + listOf( + getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" + ) + ) + } + } + compileOptions { + sourceCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + targetCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + } + kotlinOptions { + jvmTarget = RudderstackBuildConfig.Build.JVM_TARGET + javaParameters = true + } + testOptions { + unitTests { + this.isIncludeAndroidResources = true + } + } +} + +dependencies { + + testImplementation(libs.android.x.test.ext.junitktx) + testImplementation(libs.android.x.testrules) + testImplementation(libs.awaitility) + testImplementation(libs.hamcrest) + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.robolectric) + + androidTestImplementation(libs.android.x.test.ext.junitktx) + androidTestImplementation(libs.android.x.test.espresso) + androidTestImplementation(libs.android.x.testrules) +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-aar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/rudderjsonadapter/build.gradle b/rudderjsonadapter/build.gradle deleted file mode 100644 index 02a22140..00000000 --- a/rudderjsonadapter/build.gradle +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'java-library' - id 'kotlin' -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -compileKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -compileTestKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} -apply from : "$projectDir/../dependencies.gradle" - - - -dependencies { - - testImplementation 'junit:junit:4.+' - testImplementation deps.hamcrest -} -apply from: rootProject.file('gradle/artifacts-jar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/rudderjsonadapter/build.gradle.kts b/rudderjsonadapter/build.gradle.kts new file mode 100644 index 00000000..3e9e5b17 --- /dev/null +++ b/rudderjsonadapter/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("java-library") + id("kotlin") +} + +dependencies { + testImplementation(libs.junit) + testImplementation(libs.hamcrest) +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-jar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/rudderreporter/build.gradle b/rudderreporter/build.gradle deleted file mode 100644 index e845a71a..00000000 --- a/rudderreporter/build.gradle +++ /dev/null @@ -1,97 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'org.jetbrains.kotlin.android' -} -apply from : "$projectDir/../dependencies.gradle" -android { - namespace 'com.rudderstack.android.ruddermetricsreporterandroid' - compileSdk library.target_sdk - - defaultConfig { - minSdk library.min_sdk - targetSdk library.target_sdk - consumerProguardFiles 'proguard-rules.pro' - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } - java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - kotlinOptions { - jvmTarget = '17' - } - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -dependencies { - -// implementation deps.kotlinCore - implementation deps.androidXAnnotations - - api(project(path: projects.json_rudder_adapter)) - api(project(projects.repository)) - api(project(path: projects.web)) - api(project(path: projects.moshi_rudder_adapter)) - - compileOnly deps.gson - compileOnly deps.jackson - compileOnly deps.moshi.core - compileOnly deps.moshi.kotlin - compileOnly deps.moshi.adapter - - testImplementation(project(path: projects.moshi_rudder_adapter)) - testImplementation(project(path: projects.gson_rudder_adapter)) - testImplementation(project(path: projects.jackson_rudder_adapter)) - testImplementation deps.moshi.kotlin - testImplementation deps.moshi.core - testImplementation deps.gson - testImplementation deps.jackson - testImplementation deps.androidXTestExtJunitKtx - testImplementation deps.androidXTestRules - testImplementation deps.androidXTest - testImplementation deps.hamcrest - testImplementation deps.mockito - testImplementation deps.mockito_kotlin - testImplementation deps.awaitility - testImplementation deps.robolectric - testImplementation project(path: projects.repository) - - -// androidTestImplementation(project(path: projects.moshi_rudder_adapter)) -// androidTestImplementation(project(path: projects.gson_rudder_adapter)) - androidTestImplementation(project(path: projects.jackson_rudder_adapter)) - androidTestImplementation deps.moshi.kotlin - androidTestImplementation deps.moshi.core -// androidTestImplementation deps.gson -// androidTestImplementation deps.jackson - androidTestImplementation deps.androidXTestExtJunitKtx - androidTestImplementation deps.androidXTestRules - androidTestImplementation deps.androidXTest -// androidTestImplementation deps.hamcrest -// androidTestImplementation deps.mockito -// androidTestImplementation deps.mockito_kotlin - androidTestImplementation deps.androidXTestRunner -// androidTestImplementation('androidx.test.espresso:espresso-contrib:3.5.1') { -// exclude module: "protobuf-lite" -// } -} -apply from: rootProject.file('gradle/artifacts-aar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/rudderreporter/build.gradle.kts b/rudderreporter/build.gradle.kts new file mode 100644 index 00000000..14f659c6 --- /dev/null +++ b/rudderreporter/build.gradle.kts @@ -0,0 +1,88 @@ +plugins { + id("com.android.library") + id("kotlin-android") + id("org.jetbrains.kotlin.android") +} + +android { + + namespace = "com.rudderstack.android.ruddermetricsreporterandroid" + compileSdk = RudderstackBuildConfig.Android.TARGET_SDK + + defaultConfig { + minSdk = RudderstackBuildConfig.Android.MIN_SDK + targetSdk = RudderstackBuildConfig.Android.TARGET_SDK + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + named("release") { + isMinifyEnabled = false + setProguardFiles( + listOf( + getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" + ) + ) + } + } + compileOptions { + sourceCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + targetCompatibility = RudderstackBuildConfig.Build.JAVA_VERSION + } + kotlinOptions { + jvmTarget = RudderstackBuildConfig.Build.JVM_TARGET + javaParameters = true + } + testOptions { + unitTests { + this.isIncludeAndroidResources = true + } + } +} + +dependencies { + + implementation(libs.android.x.annotation) + + api(project(":rudderjsonadapter")) + api(project(":repository")) + api(project(":web")) + api(project(":moshirudderadapter")) + + compileOnly(libs.gson) + compileOnly(libs.jackson.core) + compileOnly(libs.moshi) + compileOnly(libs.moshi.kotlin) + compileOnly(libs.moshi.adapters) + + testImplementation(project(":moshirudderadapter")) + testImplementation(project(":gsonrudderadapter")) + testImplementation(project(":jacksonrudderadapter")) + testImplementation(project(":repository")) + testImplementation(libs.android.x.test) + testImplementation(libs.android.x.testrules) + testImplementation(libs.android.x.test.ext.junitktx) + testImplementation(libs.awaitility) + testImplementation(libs.gson) + testImplementation(libs.jackson.core) + testImplementation(libs.hamcrest) + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.moshi) + testImplementation(libs.moshi.kotlin) + testImplementation(libs.robolectric) + + androidTestImplementation(project(":jacksonrudderadapter")) + androidTestImplementation(libs.android.x.test) + androidTestImplementation(libs.android.x.testrules) + androidTestImplementation(libs.android.x.testrunner) + androidTestImplementation(libs.android.x.test.ext.junitktx) + androidTestImplementation(libs.moshi) + androidTestImplementation(libs.moshi.kotlin) +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-aar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle") diff --git a/samples/sample-kotlin-android/build.gradle.kts b/samples/sample-kotlin-android/build.gradle.kts index 2e401252..6ce9dab0 100644 --- a/samples/sample-kotlin-android/build.gradle.kts +++ b/samples/sample-kotlin-android/build.gradle.kts @@ -13,16 +13,16 @@ val sampleRudderProperties = Properties().apply { } android { + val javaVersion = RudderstackBuildConfig.Build.JAVA_VERSION + val jvm = 17 + val composeCompilerVersion = RudderstackBuildConfig.Kotlin.COMPILER_EXTENSION_VERSION + val androidCompileSdkVersion = RudderstackBuildConfig.Android.COMPILE_SDK + val androidMinSdkVersion = 26 val majorVersion = 0 val minVersion = 1 val patchVersion = 0 val libraryVersionName = "${majorVersion}.${minVersion}.${patchVersion}" val libraryVersionCode = majorVersion * 1000 + minVersion * 100 + patchVersion - val javaVersion = JavaVersion.VERSION_17 - val jvm = 17 - val composeCompilerVersion = "1.4.8" - val androidCompileSdkVersion = 34 - val androidMinSdkVersion = 26 compileSdk = androidCompileSdkVersion @@ -77,7 +77,7 @@ android { targetCompatibility = javaVersion } kotlinOptions { - jvmTarget = "17" + jvmTarget = RudderstackBuildConfig.Build.JVM_TARGET javaParameters = true } java { @@ -86,62 +86,44 @@ android { } } buildFeatures { - compose = true - } - composeOptions { - kotlinCompilerExtensionVersion = composeCompilerVersion - } - tasks.withType { - useJUnitPlatform() - } - namespace = "com.rudderstack.android.sampleapp" - - buildFeatures { - buildConfig = true + buildFeatures { + compose = true + } + composeOptions { + kotlinCompilerExtensionVersion = composeCompilerVersion + } + tasks.withType { + useJUnitPlatform() + } + namespace = "com.rudderstack.android.sampleapp" } -} - -dependencies { - implementation("androidx.core:core-ktx:1.12.0") - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("com.google.android.material:material:1.11.0") - //compose - implementation("androidx.compose.ui:ui:1.4.3") - // Tooling support (Previews, etc.) - implementation("androidx.compose.ui:ui-tooling:1.4.3") - // Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.) - implementation("androidx.compose.foundation:foundation:1.4.3") - // Material Design - implementation("androidx.compose.material:material:1.4.3") - // Material design icons - implementation("androidx.compose.material:material-icons-core:1.4.3") - implementation("androidx.compose.material:material-icons-extended:1.4.3") - // Integration with activities - implementation("androidx.activity:activity-compose:1.8.2") - // Integration with ViewModels - implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2") - // Integration with observables - implementation("androidx.compose.runtime:runtime-livedata:1.4.3") - implementation("androidx.compose.ui:ui-tooling-preview:1.4.3") - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") - // adding play services to generate advertising id - implementation("com.google.android.gms:play-services-ads:22.1.0") - implementation(project(":android")) - implementation(project(":moshirudderadapter")) - implementation(project(":gsonrudderadapter")) - implementation(project(":jacksonrudderadapter")) - implementation(project(":repository")) - implementation(project(":core")) - implementation(project(":models")) - implementation(project(":web")) - implementation(project(":rudderreporter")) - implementation(project(":libs:sync")) - implementation(project(":libs:navigationplugin")) + dependencies { + implementation("com.google.android.material:material:1.12.0") + //compose + implementation("androidx.compose.ui:ui:1.6.7") + implementation("androidx.compose.ui:ui-tooling-preview:1.6.7") + implementation("androidx.compose.ui:ui-tooling:1.6.7") + implementation("androidx.compose.foundation:foundation:1.6.7") + // Material Design + implementation("androidx.compose.material:material:1.6.7") + // Integration with activities + implementation("androidx.activity:activity-compose:1.9.0") + // Integration with ViewModels + implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.0") + // adding play services to generate advertising id + implementation("com.google.android.gms:play-services-ads:22.1.0") - - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") - androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.5.4") - debugImplementation("androidx.compose.ui:ui-test-manifest:1.5.4") + implementation(project(":android")) + implementation(project(":moshirudderadapter")) + implementation(project(":gsonrudderadapter")) + implementation(project(":jacksonrudderadapter")) + implementation(project(":repository")) + implementation(project(":core")) + implementation(project(":models")) + implementation(project(":web")) + implementation(project(":rudderreporter")) + implementation(project(":libs:sync")) + implementation(project(":libs:navigationplugin")) + } } diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 40a4b3f3..00000000 --- a/settings.gradle +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - gradlePluginPortal() - google() - mavenCentral() - maven { url = "https://maven.pkg,space/public/p/compose/dev" } - maven { - url = uri("https://plugins.gradle.org/m2/") - } - jcenter() // Warning: this repository is going to shut down soon - } -} - -rootProject.name = "Rudder-Android-Libs" -include ':core' -include ':android' -include ':web' -include ':gsonrudderadapter' -include ':repository' -include ':models' -include ':rudderjsonadapter' -include ':rudderreporter' -include ':jacksonrudderadapter' -include ':moshirudderadapter' -include ':libs:navigationplugin' -//include ':libs:testcommon' -include ':libs:test-common' -include ':libs:sync' -include ':samples:sample-kotlin-android' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..6e8d4858 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,30 @@ +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + gradlePluginPortal() + google() + mavenCentral() + maven { setUrl("https://maven.pkg,space/public/p/compose/dev") } + maven { url = uri("https://plugins.gradle.org/m2/") } + jcenter() // Warning: this repository is going to shut down soon + } +} + +rootProject.name = "Rudder-Android-Libs" + +include( + ":core", + ":android", + ":web", + ":gsonrudderadapter", + ":repository", + ":models", + ":rudderjsonadapter", + ":rudderreporter", + ":jacksonrudderadapter", + ":moshirudderadapter", + ":libs:navigationplugin", + ":libs:test-common", + ":libs:sync", + ":samples:sample-kotlin-android", +) diff --git a/web/build.gradle b/web/build.gradle deleted file mode 100644 index 96258e76..00000000 --- a/web/build.gradle +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Creator: Debanjan Chatterjee on 30/09/21, 11:41 PM Last modified: 30/09/21, 11:39 PM - * Copyright: All rights reserved Ⓒ 2021 http://rudderstack.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain a - * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -plugins { - id 'java-library' - id 'kotlin' -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} -compileKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} - -apply from : "$projectDir/../dependencies.gradle" -compileTestKotlin { - kotlinOptions.jvmTarget = "17" - kotlinOptions.javaParameters = true -} - - -dependencies { - - implementation(project(path: ":rudderjsonadapter")) - - //test - testImplementation 'junit:junit:4.13.2' - testImplementation(project(path: ':moshirudderadapter', configuration: 'default')) - testImplementation(project(path: ':gsonrudderadapter', configuration: 'default')) - testImplementation(project(path: ':jacksonrudderadapter', configuration: 'default')) - testImplementation deps.moshi.kotlin - testImplementation deps.moshi.core - testImplementation deps.gson - testImplementation deps.jackson - testImplementation deps.hamcrest - testImplementation deps.mockito - testImplementation deps.awaitility -} -apply from: rootProject.file('gradle/artifacts-jar.gradle') -apply from: rootProject.file('gradle/mvn-publish.gradle') -apply from: rootProject.file('gradle/codecov.gradle') diff --git a/web/build.gradle.kts b/web/build.gradle.kts new file mode 100644 index 00000000..825e2c60 --- /dev/null +++ b/web/build.gradle.kts @@ -0,0 +1,26 @@ +plugins { + id("java-library") + id("kotlin") +} + +dependencies { + + implementation(project(":rudderjsonadapter")) + + testImplementation(libs.awaitility) + testImplementation(libs.gson) + testImplementation(libs.hamcrest) + testImplementation(libs.jackson.core) + testImplementation(libs.junit) + testImplementation(libs.mockito.core) + testImplementation(libs.moshi) + testImplementation(libs.moshi.kotlin) + + testImplementation(project(":moshirudderadapter")) + testImplementation(project(":gsonrudderadapter")) + testImplementation(project(":jacksonrudderadapter")) +} + +apply(from = "${project.projectDir.parentFile}/gradle/artifacts-jar.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/mvn-publish.gradle") +apply(from = "${project.projectDir.parentFile}/gradle/codecov.gradle")