-
Notifications
You must be signed in to change notification settings - Fork 125
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 #72 from icerockdev/develop
Release 0.10.0
- Loading branch information
Showing
125 changed files
with
2,008 additions
and
1,003 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
import org.gradle.api.artifacts.Dependency | ||
import org.gradle.kotlin.dsl.DependencyHandlerScope | ||
import org.gradle.plugin.use.PluginDependenciesSpec | ||
import org.gradle.plugin.use.PluginDependencySpec | ||
|
||
// TODO move to https://github.com/icerockdev/mobile-multiplatform-gradle-plugin | ||
data class PluginDesc( | ||
val id: String, | ||
val module: String? = null, | ||
val version: String? = null | ||
) | ||
|
||
fun DependencyHandlerScope.plugin(pluginDesc: PluginDesc): Dependency? { | ||
return pluginDesc.module?.let { "classpath"(it) } | ||
} | ||
|
||
fun DependencyHandlerScope.plugins(pluginDescList: List<PluginDesc>) { | ||
pluginDescList | ||
.distinctBy { it.module } | ||
.forEach { plugin(it) } | ||
} | ||
|
||
fun PluginDependenciesSpec.plugin(pluginDesc: PluginDesc): PluginDependencySpec { | ||
val spec = id(pluginDesc.id) | ||
pluginDesc.version?.also { spec.version(it) } | ||
return spec | ||
} |
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
Oops, something went wrong.