Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for reduceGraph (0.14 sec)

  1. platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/reduceGraph.kt

     * e.g.:
     * ```
     * reduce({a: [b, c], b: [e1], c: [d], d: [e2]}) => {a: [e1, e2], b: [e1], c: [e2], d: [e2]}
     * ```
     */
    internal
    fun <V> reduceGraph(graph: Map<V, List<V>>): Map<V, Set<V>> {
    
        val result = mutableMapOf<V, Set<V>>()
    
        val reducing = hashSetOf<V>()
    
        fun reduce(node: V, refs: Iterable<V>): Set<V> {
    
            result[node]?.let {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl-provider-plugins/src/test/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/ReduceGraphTest.kt

    import org.hamcrest.CoreMatchers.equalTo
    
    import org.junit.Test
    
    
    class ReduceGraphTest {
    
        @Test
        fun `only external node references are left in the graph`() {
    
            assertThat(
                reduceGraph(
                    mapOf(
                        "a" to listOf("b", "c"),
                        "b" to listOf("e1"),
                        "c" to listOf("d"),
                        "d" to listOf("b", "e2")
                    )
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  3. platforms/core-configuration/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/kotlin/dsl/provider/plugins/precompiled/tasks/GeneratePrecompiledScriptPluginAccessors.kt

                it.scriptPlugin.id
            }
    
            val pluginGraph = plugins.associate {
                it.id to pluginsAppliedBy(it, scriptPluginsById)
            }
    
            return reduceGraph(pluginGraph).asSequence().mapNotNull { (id, plugins) ->
                scriptPluginsById[id]?.copy(appliedPlugins = plugins.toList())
            }
        }
    
        private
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 18 08:10:49 UTC 2024
    - 24.8K bytes
    - Viewed (0)
Back to top