{"action":"closed","issue":{"url":"https://api.github.com/repos/gradle/gradle/issues/8093","repository_url":"https://api.github.com/repos/gradle/gradle","labels_url":"https://api.github.com/repos/gradle/gradle/issues/8093/labels{/name}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/8093/comments","events_url":"https://api.github.com/repos/gradle/gradle/issues/8093/events","html_url":"https://github.com/gradle/gradle/issues/8093","id":393057531,"node_id":"MDU6SXNzdWUzOTMwNTc1MzE=","number":8093,"title":"getCandidateClassFiles doesn't work","user":{"login":"quentinflahaut","id":6180519,"node_id":"MDQ6VXNlcjYxODA1MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/6180519?v=4","gravatar_id":"","url":"https://api.github.com/users/quentinflahaut","html_url":"https://github.com/quentinflahaut","followers_url":"https://api.github.com/users/quentinflahaut/followers","following_url":"https://api.github.com/users/quentinflahaut/following{/other_user}","gists_url":"https://api.github.com/users/quentinflahaut/gists{/gist_id}","starred_url":"https://api.github.com/users/quentinflahaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quentinflahaut/subscriptions","organizations_url":"https://api.github.com/users/quentinflahaut/orgs","repos_url":"https://api.github.com/users/quentinflahaut/repos","events_url":"https://api.github.com/users/quentinflahaut/events{/privacy}","received_events_url":"https://api.github.com/users/quentinflahaut/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-20T13:57:36Z","updated_at":"2018-12-20T14:12:18Z","closed_at":"2018-12-20T14:12:17Z","author_association":"NONE","body":"Gradle v5\r\n\r\nmy project contains this:\r\n```\r\nsourceSets {\r\n    main {\r\n        java {\r\n            srcDirs = ['src/main/java']\r\n        }\r\n    }\r\n    test {\r\n        java {\r\n            srcDirs = ['src/test/java']\r\n        }\r\n        resources {\r\n            srcDirs = ['src/test/resources']\r\n        }\r\n    }\r\n}\r\n```\r\nI have severals test class in my src/testjava folder \r\n\r\nIn my gradle.properties, `test.getCandidateClassFiles().size()` return 0\r\nHere is the gradle code of the method:\r\n```\r\npublic FileTree getCandidateClassFiles() {\r\n        return getTestClassesDirs().getAsFileTree().matching(patternSet);\r\n    }\r\n```\r\nI did further investigation and I got this:\r\n`println test.getTestClassesDirs().getFiles()`\r\n\r\n> [C:\\ng\\src\\svn\\platform\\apollo\\apollo-core\\sparql-processing\\build\\classes\\java\\test]\r\n\r\n`println test.getTestClassesDirs().getAsFileTree().getFiles()`\r\n\r\n> []\r\n\r\nHowever the result should be the same.\r\n"}}
{"actor":{"display_login":"big-guy"}}