Repository navigation
Plugin DSL #15314
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
Plugin DSL #15314
Changes from all commits
c9c3269
186f6f6
dd2fd67
74159ec
44d06ab
77f94c3
5f79fae
448adf1
e6da156
1e7728c
7610b17
320eed4
9bdab52
be9c5b5
6df0fe1
b7a7a4c
8329b6f
4fad668
79fb6cf
e3c97b8
d573663
4fd566e
7d0c5b8
f34d4ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,12 @@ | ||
| plugins { | ||
| id "com.automattic.android.fetchstyle" | ||
| id "io.gitlab.arturbosch.detekt" | ||
| id "androidx.navigation.safeargs.kotlin" apply false | ||
| id "com.android.library" apply false | ||
|
Comment on lines
+4
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just FYI: last week I had an attempt of fixing this by moving all Android-dependant plugins away from root project but eventually this idea failed because of how Kotlin Gradle Plugin works with Gradle API. Apparently, it seems to be not-fixable. See https://youtrack.jetbrains.com/issue/KT-31643 for details and my attempt: woocommerce/woocommerce-android#5523
oguzkocer marked this conversation as resolved.
Resolved
|
||
| id 'com.google.gms.google-services' apply false | ||
| id "org.jetbrains.kotlin.plugin.parcelize" apply false | ||
| } | ||
|
|
||
| ext { | ||
| wordPressUtilsVersion = '2.5.0' | ||
| wordPressLoginVersion = '0.14.0' | ||
|
|
@@ -41,40 +50,8 @@ ext { | |
| nhaarmanMockitoVersion = "2.2.0" | ||
| } | ||
|
|
||
| buildscript { | ||
| ext.kotlinVersion = '1.6.10' | ||
| ext.navComponentVersion = '2.4.2' | ||
| ext.detektVersion = '1.15.0' | ||
| ext.daggerVersion = '2.41' | ||
|
|
||
| repositories { | ||
| maven { | ||
| url 'https://a8c-libs.s3.amazonaws.com/android' | ||
| content { | ||
| includeGroup "com.automattic.android" | ||
| } | ||
| } | ||
| maven { url "https://plugins.gradle.org/m2/" } | ||
| google() | ||
| } | ||
|
|
||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:7.1.1' | ||
| classpath 'com.automattic.android:fetchstyle:1.1' | ||
| classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion" | ||
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" | ||
| classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion" | ||
| classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navComponentVersion" | ||
| classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion" | ||
| classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerVersion" | ||
| } | ||
| } | ||
|
|
||
| apply plugin: 'com.automattic.android.fetchstyle' | ||
|
|
||
| allprojects { | ||
| apply plugin: 'checkstyle' | ||
| apply plugin: 'io.gitlab.arturbosch.detekt' | ||
|
|
||
| repositories { | ||
| google() | ||
|
|
@@ -114,6 +91,7 @@ allprojects { | |
| } | ||
|
|
||
| detekt { | ||
| toolVersion = gradle.ext.detektVersion | ||
| config = files("${project.rootDir}/config/detekt/detekt.yml") | ||
| autoCorrect = false | ||
| buildUponDefaultConfig = false | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| apply plugin: 'com.android.library' | ||
| plugins { | ||
| id "com.android.library" | ||
| } | ||
|
|
||
| repositories { | ||
| maven { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +0,0 @@ | ||
| buildscript { | ||
| repositories { | ||
| google() | ||
| } | ||
| } | ||
|
|
||
| allprojects { | ||
| apply plugin: 'checkstyle' | ||
|
|
||
| if (tasks.findByPath('checkstyle') == null) { | ||
| tasks.create(name: 'checkstyle', type: Checkstyle) { | ||
| source 'src' | ||
|
|
||
| classpath = files() | ||
| } | ||
|
|
||
| checkstyle { | ||
| toolVersion = '8.3' | ||
| configFile file("${project.rootDir}/config/checkstyle.xml") | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| apply plugin: 'com.android.application' | ||
| plugins { | ||
| id "com.android.application" | ||
| } | ||
|
|
||
| repositories { | ||
| maven { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| apply plugin: 'com.android.library' | ||
| plugins { | ||
| id "com.android.library" | ||
| } | ||
|
|
||
| android { | ||
| compileSdkVersion 29 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| apply plugin: 'com.android.library' | ||
| plugins { | ||
| id "com.android.library" | ||
| } | ||
|
|
||
| android { | ||
| compileSdkVersion 29 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As "dependency on the standard library (stdlib) is added automatically to each source set" we shouldn't need this or any other
stdlibas direct dependency. WDYT about removing this and rest of them in other projects?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a change I've been wanting to make for a while now, but I strongly prefer making these changes in a standalone PRs especially in WPAndroid where there are quite a few modules. That's unless that change becomes a requirement for this PR.