Skip to content

chore: Convert build.gradle files to Kotlin #2183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 2, 2023
Merged
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
51 changes: 0 additions & 51 deletions aws-analytics-pinpoint/build.gradle

This file was deleted.

52 changes: 52 additions & 0 deletions aws-analytics-pinpoint/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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("org.jetbrains.kotlin.plugin.serialization") version "1.6.10"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add this version in root gradle file and apply it here to prevent using different versions in different modules?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this can be declared in a version catalog as well, good callout

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to do this as a separate change in a future PR

id("com.android.library")
id("kotlin-android")
id("org.jlleitschuh.gradle.ktlint")
}

apply(from = rootProject.file("configuration/checkstyle.gradle"))
apply(from = rootProject.file("configuration/publishing.gradle"))

group = properties["POM_GROUP"].toString()

dependencies {
implementation(project(":core"))
implementation(project(":aws-auth-cognito"))

implementation(dependency.androidx.appcompat)
implementation(dependency.aws.pinpointKotlin)
implementation(dependency.kotlin.serializationJson)

testImplementation(testDependency.junit)
testImplementation(testDependency.mockk)
testImplementation(testDependency.mockito)
testImplementation(testDependency.mockitoinline)
testImplementation(testDependency.robolectric)
testImplementation(testDependency.androidx.test.junit)
testImplementation(testDependency.androidx.test.core)
testImplementation(testDependency.kotlin.test.coroutines)
testImplementation(project(":aws-analytics-pinpoint"))

androidTestImplementation(project(":testutils"))
androidTestImplementation(testDependency.androidx.test.core)
androidTestImplementation(testDependency.androidx.test.runner)
androidTestImplementation(testDependency.kotlin.test.coroutines)
androidTestImplementation(testDependency.androidx.test.junit)
androidTestImplementation(project(":aws-analytics-pinpoint"))
}
34 changes: 0 additions & 34 deletions aws-api-appsync/build.gradle

This file was deleted.

37 changes: 37 additions & 0 deletions aws-api-appsync/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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")
}

apply(from = rootProject.file("configuration/checkstyle.gradle"))
apply(from = rootProject.file("configuration/publishing.gradle"))

group = properties["POM_GROUP"].toString()

dependencies {
implementation(project(":core"))

implementation(dependency.androidx.annotation)
implementation(dependency.androidx.core)
implementation(dependency.gson)

testImplementation(testDependency.junit)
testImplementation(testDependency.robolectric)
testImplementation(testDependency.jsonassert)
testImplementation(project(":testmodels"))
testImplementation(project(":testutils"))
}
49 changes: 0 additions & 49 deletions aws-api/build.gradle

This file was deleted.

52 changes: 52 additions & 0 deletions aws-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 = rootProject.file("configuration/checkstyle.gradle"))
apply(from = rootProject.file("configuration/publishing.gradle"))

group = properties["POM_GROUP"].toString()

dependencies {
api(project(":core"))
implementation(project(":aws-api-appsync"))
implementation(project(":aws-auth-cognito"))

implementation(dependency.androidx.appcompat)
implementation(dependency.aws.signing)
implementation(dependency.gson)
implementation(dependency.okhttp)

testImplementation(project(":testutils"))
testImplementation(project(":testmodels"))
testImplementation(testDependency.androidx.test.core)
testImplementation(testDependency.jsonassert)
testImplementation(testDependency.junit)
testImplementation(testDependency.mockito)
testImplementation(testDependency.mockwebserver)
testImplementation(dependency.rxjava)
testImplementation(testDependency.robolectric)

androidTestImplementation(project(":testutils"))
androidTestImplementation(project(":testmodels"))
androidTestImplementation(testDependency.androidx.test.core)
androidTestImplementation(testDependency.androidx.test.runner)
androidTestImplementation(testDependency.androidx.test.junit)
androidTestImplementation(dependency.rxjava)
}
61 changes: 0 additions & 61 deletions aws-auth-cognito/build.gradle

This file was deleted.

Loading