-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Using kts files instead of .gradle #807
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
Open
pfmaggi
wants to merge
20
commits into
main
Choose a base branch
from
pfm/kts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
03bc61e
Initial incomplete conversion to Gradle Kotlin DSL
pfmaggi ed5bf5a
Completed, not working, conversion to Kotlin DSL
pfmaggi 730b944
Corrected syntax for dynamicFeatures
pfmaggi 1cc9636
More conversion for KTS and spotless Update
pfmaggi 53aeb17
spotless also checks *.kts files
pfmaggi b4825b1
Updated copyright of *.gradle.kts files
pfmaggi 466387a
Enable kapt build cache for :app
pfmaggi 22978d5
Align import syntax of properties to the one used in Groovy
pfmaggi 9ee9a4d
Downgraded to AGP v3.6-beta05 to avoid issues on the check task.
pfmaggi 9f7b861
Update to handle properties with double quotes.
pfmaggi e7f06a1
Update to AGP 3.6.0-rc1
pfmaggi 80c62e1
Add the main Glide artifact to kapt classpath
pfmaggi aeb6ed1
Revert change to read properties WITH double-quotes.
pfmaggi 7a595ff
Integrate some ideas from #811
pfmaggi d416128
Address a couple of comments on the PR
pfmaggi e5da487
Adopt the Java Platform plugin to share dependencies versions.
pfmaggi 5df57f4
Manage kapt version sets through Java Platform plugin
pfmaggi 3ba21d9
Adds Libs object with libray names and version set for kapt
pfmaggi 898bd24
Address PR comments
pfmaggi f66882e
Address comments from the PR.
pfmaggi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,67 @@ | ||
| /* | ||
| * Copyright 2019 Google LLC. | ||
| * | ||
| * 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.dynamic-feature") | ||
| kotlin("android") | ||
| kotlin("kapt") | ||
| } | ||
|
|
||
| apply(from = "$rootDir/shared_dependencies.gradle.kts") | ||
| apply(from = "$rootDir/test_dependencies.gradle.kts") | ||
|
|
||
| android { | ||
| compileSdkVersion(Versions.COMPILE_SDK) | ||
|
|
||
| defaultConfig { | ||
| minSdkVersion(Versions.MIN_SDK) | ||
| targetSdkVersion(Versions.TARGET_SDK) | ||
|
|
||
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
|
||
| javaCompileOptions { | ||
| annotationProcessorOptions { | ||
| arguments = mapOf("dagger.gradle.incremental" to "true") | ||
| } | ||
| } | ||
| } | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| dataBinding.isEnabled = true | ||
| } | ||
|
|
||
| dependencies { | ||
| api(platform(project(":depconstraints"))) | ||
| kapt(platform(project(":depconstraints"))) | ||
|
|
||
| implementation(project(":app")) | ||
| implementation(project(":core")) | ||
| implementation(project(":bypass")) | ||
|
|
||
| implementation(Libs.AX_VIEWPAGER2) | ||
| implementation(Libs.SUPPORT_CUSTOMTABS) | ||
| implementation(Libs.GLIDE) | ||
|
|
||
| kapt("com.google.dagger:dagger-compiler") | ||
| } | ||
|
|
||
| kapt { | ||
| useBuildCache = true | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,105 @@ | ||
| /* | ||
| * Copyright 2019 Google LLC. | ||
| * | ||
| * 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.application") | ||
| id("com.google.gms.google-services") | ||
| id("io.fabric") | ||
| kotlin("android") | ||
| id("kotlin-android-extensions") | ||
| kotlin("kapt") | ||
| } | ||
|
|
||
| apply(from = "$rootDir/shared_dependencies.gradle.kts") | ||
| apply(from = "$rootDir/test_dependencies.gradle.kts") | ||
|
|
||
| android { | ||
| compileSdkVersion(Versions.COMPILE_SDK) | ||
|
|
||
| defaultConfig { | ||
| applicationId = Names.APPLICATION_ID | ||
| minSdkVersion(Versions.MIN_SDK) | ||
| targetSdkVersion(Versions.TARGET_SDK) | ||
| versionCode = 100 + (runCmd("git", "rev-list", "--count", "HEAD")?.toIntOrNull() ?: 1) | ||
| versionName = "1.1.0" | ||
|
|
||
| setProperty("archivesBaseName", "plaid") | ||
|
|
||
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
|
||
| resConfig("en") | ||
| manifestPlaceholders = mapOf("crashlyticsEnabled" to false) | ||
|
|
||
| javaCompileOptions { | ||
| annotationProcessorOptions { | ||
| arguments = mapOf("dagger.gradle.incremental" to "true") | ||
| } | ||
| } | ||
| } | ||
|
|
||
| buildTypes { | ||
| getByName("release") { | ||
| // There's a Dex Splitter issue when enabling DataBinding & proguard in dynamic features | ||
| // The temporary workaround is to disable shrinking | ||
pfmaggi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // This issue is tracked in: https://issuetracker.google.com/120517460 | ||
| isMinifyEnabled = false | ||
| manifestPlaceholders = mapOf("crashlyticsEnabled" to true) | ||
|
|
||
| proguardFiles( | ||
| getDefaultProguardFile("proguard-android.txt"), | ||
| "proguard-rules.pro" | ||
| ) | ||
| } | ||
| getByName("debug") { | ||
| (this as ExtensionAware).extra["alwaysUpdateBuildId"] = false | ||
| } | ||
| } | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| dynamicFeatures = hashSetOf( | ||
| ":about", | ||
| ":designernews", | ||
| ":dribbble", | ||
| ":search" | ||
| ) | ||
|
|
||
| dataBinding.isEnabled = true | ||
|
|
||
| kotlinOptions { | ||
| jvmTarget = "1.8" | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| api(platform(project(":depconstraints"))) | ||
| kapt(platform(project(":depconstraints"))) | ||
|
|
||
| implementation(project(":core")) | ||
| implementation(Libs.AX_APPCOMPAT) | ||
| implementation(Libs.AX_LIFECYCLE_EXTENSION) | ||
| implementation(Libs.CRASHLYTICS) | ||
| implementation(Libs.GLIDE) | ||
| implementation(Libs.GLIDE_RECYCLERVIEW) | ||
| implementation(Libs.FIREBASE_CORE) | ||
|
|
||
| kapt(Libs.DAGGER_COMPILER) | ||
| } | ||
|
|
||
| kapt.useBuildCache = true | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.