-
Notifications
You must be signed in to change notification settings - Fork 4
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 #107 from matheus-corregiari/release/1.9.0
Release/1.9.0
- Loading branch information
Showing
271 changed files
with
1,175 additions
and
3,314 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,12 +1,11 @@ | ||
**/build | ||
**/.kotlin/ | ||
**/.gradle/ | ||
**/.idea/ | ||
**/.git/ | ||
*.log | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea | ||
.DS_Store | ||
/build | ||
**/build | ||
*/build | ||
/captures | ||
.externalNativeBuild | ||
toolkit/build/ |
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,14 +1,7 @@ | ||
plugins { | ||
id("jacoco") | ||
|
||
alias(pluginLibraries.plugins.android.application) apply false | ||
alias(pluginLibraries.plugins.android.library) apply false | ||
alias(pluginLibraries.plugins.google.ksp) apply false | ||
alias(pluginLibraries.plugins.jetbrains.kotlin) apply false | ||
alias(pluginLibraries.plugins.jetbrains.multiplatform) apply false | ||
alias(pluginLibraries.plugins.jetbrains.serialization) apply false | ||
alias(pluginLibraries.plugins.dexcount) apply false | ||
alias(pluginLibraries.plugins.detekt) apply false | ||
// TODO Pedrinho, help me | ||
// alias(pluginLibraries.plugins.pedrinho_publish) apply false | ||
alias(libs.plugins.google.ksp) apply false | ||
alias(libs.plugins.jetbrains.serialization) apply false | ||
alias(libs.plugins.dexcount) apply false | ||
} |
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,14 @@ | ||
# | ||
# | ||
# | ||
# | ||
# | ||
# ----------- PROJECT CONFIG -------------- | ||
# Gradle | ||
org.gradle.jvmargs=-Xmx8192m -XX:+UseParallelGC -Dkotlin.daemon.jvm.options\="-Xmx8192m" | ||
org.gradle.parallel=true | ||
org.gradle.warning.mode=none | ||
org.gradle.configuration-cache=true | ||
# Kotlin | ||
kotlin.mpp.androidGradlePluginCompatibility.nowarn=trueorg.gradle.parallel=true | ||
# |
File renamed without changes.
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
49 changes: 49 additions & 0 deletions
49
buildSrc/src/main/kotlin/com/toolkit/plugin/ToolkitGroupPlugin.kt
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,49 @@ | ||
package com.toolkit.plugin | ||
|
||
import com.toolkit.plugin.util.applyPlugins | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.jetbrains.kotlin.com.google.gson.JsonArray | ||
import java.nio.file.Files | ||
|
||
internal class ToolkitGroupPlugin : Plugin<Project> { | ||
|
||
override fun apply(target: Project) { | ||
target.evaluationDependsOnChildren() | ||
target.applyPlugins("jetbrains-kover") | ||
|
||
// Try to unify coverage reports | ||
target.subprojects.onEach { target.dependencies.add("kover", it) } | ||
|
||
// Generate file containing all modules with publish plugin attached | ||
target.tasks.register("publishModules") { task -> | ||
task.group = "groupTask" | ||
// Store target directory into a variable to avoid project reference in the configuration cache | ||
val directory = task.project.layout.buildDirectory.get() | ||
val file = directory.file("modules.txt").asFile | ||
val publishAndroidLibraries = task.project.allAndroid() | ||
val publishMultiplatformLibraries = task.project.allMultiplatform() | ||
task.doLast { _ -> | ||
Files.createDirectories(directory.asFile.toPath()) | ||
val json = JsonArray() | ||
publishAndroidLibraries.onEach(json::add) | ||
publishMultiplatformLibraries.onEach(json::add) | ||
|
||
if (file.exists().not()) file.createNewFile() | ||
file.writeText(json.toString()) | ||
println("Publish module list generated at: $file") | ||
println(json.toString()) | ||
} | ||
} | ||
} | ||
|
||
private fun Project.allAndroid(prefix: String = "toolkit"): List<String> = | ||
if (plugins.hasPlugin("toolkit-android-publish")) listOf("$prefix:$name") | ||
else subprojects.filter { it.subprojects.isEmpty() } | ||
.flatMap { it.allAndroid("$prefix:android") } | ||
|
||
private fun Project.allMultiplatform(prefix: String = "toolkit"): List<String> = | ||
if (plugins.hasPlugin("toolkit-multiplatform-publish")) listOf("$prefix:$name") | ||
else subprojects.filter { it.subprojects.isEmpty() } | ||
.flatMap { it.allMultiplatform("$prefix:multi") } | ||
} |
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
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.