-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #434 from rudderlabs/feature/sdk-1891-convert-groo…
…vy-buildgradle-files-to-buildgradlekts feat: convert groovy build.gradle files to build.gradle.kts
- Loading branch information
Showing
30 changed files
with
585 additions
and
796 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
id("java-library") | ||
} | ||
repositories { | ||
gradlePluginPortal() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = "" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
Oops, something went wrong.