-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Some gradle-related cleanup #109
Conversation
dsvoronin
commented
Dec 17, 2023
- use centralized repository declaration
- disable jetifier
- enable configuration cache
- use convention plugins to prevent scripts duplication
gradlePluginPortal() | ||
} | ||
dependencies { | ||
classpath(libs.com.android.tools.build.gradle) |
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.
We don't need this, because it's already in plugin classpath, leaking from buildSrc.
Here
@@ -1,19 +1,3 @@ | |||
buildscript { | |||
repositories { |
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.
Now declared in settings.gradle.kts / pluginManagement
} | ||
} | ||
|
||
repositories { |
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.
Now declared in settings.gradle.kts / dependencyResolutionManagement
google() | ||
} | ||
|
||
group = Description.mavenGroup |
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.
Group is set in publishing convention now
@@ -32,12 +16,3 @@ detekt { | |||
xml.enabled = true | |||
} | |||
} | |||
|
|||
subprojects { | |||
repositories { |
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.
Now declared in settings.gradle.kts / dependencyResolutionManagement
@@ -4,4 +4,10 @@ dependencyResolutionManagement { | |||
from(files("../gradle/libs.versions.toml")) | |||
} | |||
} | |||
|
|||
repositories { |
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.
buildSrc still need separate repositories declaration, because it's a separate build; even if it's "included"
@@ -4,4 +4,10 @@ dependencyResolutionManagement { | |||
from(files("../gradle/libs.versions.toml")) | |||
} | |||
} | |||
|
|||
repositories { |
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.
pluginManagement is not declared here. Some Gradle "Magic": gradlePluginPortal implicitly added anyway and we don't need anything else yet, so let it be
project.extra.set("signing.secretKeyRingFile", "${project.rootProject.rootDir}/buildsystem/secring.gpg") | ||
} | ||
|
||
fun readVersion(): String { |
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.
Version is set a bit differently now: we need to have a version
file in every "publishable" library project directory.
I hope no additional external systems depends on previous versions files layout (under buildsystem/)
@@ -1,3 +1,4 @@ | |||
android.useAndroidX=true | |||
android.enableJetifier=true | |||
android.enableJetifier=false |
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.
No dependencies requires Jetifier was found by Studio, I assume it's safe to disable now
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError | ||
org.gradle.configuration-cache=true |
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.
CC is also working for all the tasks I tested so it's also safe to enable: a little boost to productivity for this repo
- use centralized repository declaration - disable jetifier - enable configuration cache - use convention plugins to prevent scripts duplication
650aa1d
to
7bee2b0
Compare