Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for collectPackages (0.11 sec)

  1. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/tasks/PackageListGenerator.kt

            }
        }
    
        /**
         * Implementation code that can be unit-tested.
         *
         * <p>Visible for testing.</p>
         */
        class Implementation(private val excludes: List<String>) {
            fun collectPackages(files: Iterable<Path>): Trie {
                val builder = Trie.Builder()
                for (file in files) {
                    if (Files.exists(file)) {
                        if (file.fileName.toString().endsWith(".jar")) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Sep 30 16:17:28 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  2. build-logic-commons/basics/src/test/kotlin/gradlebuild/basics/tasks/PackageListGeneratorIntegrationTest.kt

        val implementation = PackageListGenerator.Implementation(DEFAULT_EXCLUDES_FOR_TEST)
    
        private
        fun getRelocatedPackages(files: Sequence<Path>): List<String> = mutableListOf<String>().apply {
            implementation.collectPackages(files.toList()).dump(false, this::add)
        }
    
        @Test
        fun `generates a curated list of package prefixes from directories`() {
            assertEquals(EXPECTED_PACKAGE_LIST, getRelocatedPackages(someClasses()))
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Sep 30 16:17:28 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top