-
Notifications
You must be signed in to change notification settings - Fork 3
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 #51 from RedMadRobot/refactoring/AND-81
AND-81: Cleanup existing KTX
- Loading branch information
Showing
32 changed files
with
378 additions
and
479 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,46 +1,5 @@ | ||
import com.redmadrobot.build.dsl.* | ||
|
||
plugins { | ||
id("com.redmadrobot.android-config") version "0.15" | ||
id("com.redmadrobot.publish-config") version "0.15" | ||
id("com.redmadrobot.detekt") version "0.15" | ||
id("com.github.ben-manes.versions") version "0.39.0" | ||
`maven-publish` | ||
} | ||
|
||
redmadrobot { | ||
android.minSdk.set(14) | ||
|
||
publishing { | ||
signArtifacts.set(!isRunningOnCi) | ||
pom { | ||
setGitHubProject("RedMadRobot/redmadrobot-android-ktx") | ||
|
||
licenses { | ||
mit() | ||
} | ||
|
||
developers { | ||
developer(id = "osipxd", name = "Osip Fatkullin", email = "[email protected]") | ||
} | ||
} | ||
} | ||
} | ||
|
||
subprojects { | ||
apply(plugin = "io.gitlab.arturbosch.detekt") | ||
group = "com.redmadrobot.extensions" | ||
|
||
kotlinCompile { | ||
// Fix module-name conflicts with Android KTX | ||
kotlinOptions.moduleName = "redmadrobot.${project.name}" | ||
} | ||
|
||
apply(plugin = "maven-publish") | ||
publishing { | ||
repositories { | ||
if (isRunningOnCi) githubPackages("RedMadRobot/redmadrobot-android-ktx") | ||
if (isReleaseVersion && credentialsExist("ossrh")) ossrh() | ||
} | ||
} | ||
alias(rmr.plugins.detekt) | ||
alias(stack.plugins.versions) | ||
convention.detekt | ||
} |
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
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,40 @@ | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
dependencyResolutionManagement { | ||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) | ||
|
||
repositories { | ||
google { | ||
content { | ||
includeGroupByRegex("com\\.android.*") | ||
includeGroupByRegex("com\\.google.*") | ||
includeGroupByRegex("androidx.*") | ||
} | ||
} | ||
|
||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
versionCatalogs { | ||
val version = "2024.04.10" | ||
create("rmr") { | ||
from("com.redmadrobot.versions:versions-redmadrobot:$version") | ||
} | ||
|
||
create("stack") { | ||
from("com.redmadrobot.versions:versions-stack:$version") | ||
} | ||
|
||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
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,20 @@ | ||
import io.gitlab.arturbosch.detekt.Detekt | ||
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask | ||
|
||
plugins { | ||
id("io.gitlab.arturbosch.detekt") | ||
} | ||
|
||
tasks.withType<Detekt>().configureEach { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
tasks.withType<DetektCreateBaselineTask>().configureEach { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
|
||
dependencies { | ||
//noinspection UseTomlInstead | ||
detektPlugins("io.gitlab.arturbosch.detekt:detekt-rules-libraries:1.23.6") | ||
//noinspection UseTomlInstead | ||
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.6") | ||
} |
9 changes: 9 additions & 0 deletions
9
buildSrc/src/main/kotlin/convention.library.android.gradle.kts
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,9 @@ | ||
plugins { | ||
id("com.redmadrobot.android-library") | ||
id("convention.publishing") | ||
id("convention.detekt") | ||
} | ||
|
||
redmadrobot { | ||
android.minSdk = 19 | ||
} |
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,39 @@ | ||
import com.redmadrobot.build.dsl.* | ||
|
||
plugins { | ||
id("com.redmadrobot.publish-config") | ||
id("com.redmadrobot.publish") | ||
} | ||
|
||
group = "com.redmadrobot.extensions" | ||
|
||
redmadrobot { | ||
publishing { | ||
signArtifacts = !isRunningOnCi | ||
pom { | ||
setGitHubProject("RedMadRobot/redmadrobot-android-ktx") | ||
|
||
licenses { | ||
mit() | ||
} | ||
|
||
developers { | ||
developer(id = "osipxd", name = "Osip Fatkullin", email = "[email protected]") | ||
developer(id = "sonulen", name = "Andrey Tolmachev", email = "[email protected]") | ||
} | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
if (isRunningOnCi) githubPackages("RedMadRobot/redmadrobot-android-ktx") | ||
if (isReleaseVersion && credentialsExist("ossrh")) ossrh() | ||
} | ||
} | ||
|
||
kotlinCompile { | ||
kotlinOptions { | ||
moduleName = "redmadrobot.${project.name}" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.