Slackbot
03/28/2023, 8:58 PMAdam
03/28/2023, 9:00 PMMatthew Von-Maszewski
03/28/2023, 9:01 PMCould not find method testApi() for arguments
have "id java-library" in that build.gradle also. Is testApi from a version later than 6.0.1?Adam
03/28/2023, 9:02 PMMatthew Von-Maszewski
03/28/2023, 9:05 PMplugins {
id 'java-library'
}
apply plugin: 'java-library'
The above is from the file with testApi failure.Adam
03/28/2023, 9:07 PMMatthew Von-Maszewski
03/28/2023, 9:09 PMAdam
03/28/2023, 9:13 PMMatthew Von-Maszewski
03/28/2023, 9:14 PMMatthew Von-Maszewski
03/28/2023, 9:15 PMAdam
03/28/2023, 9:16 PMMatthew Von-Maszewski
03/28/2023, 9:16 PMAdam
03/28/2023, 9:20 PMAdam
03/28/2023, 9:21 PMAdam
03/28/2023, 9:21 PMMatthew Von-Maszewski
03/28/2023, 9:21 PMAdam
03/28/2023, 9:22 PMMatthew Von-Maszewski
03/28/2023, 9:23 PMMatthew Von-Maszewski
03/28/2023, 9:23 PMAdam
03/28/2023, 9:24 PMjava-test-fixtures
in the providing subproject
2. expose the library using testFixturesApi(...)
3. in the consuming subproject, add a dependency using testImplementation(testFixtures(project(":my-library")))
Adam
03/28/2023, 9:24 PMMatthew Von-Maszewski
03/28/2023, 9:27 PMMatthew Von-Maszewski
03/28/2023, 9:29 PMAdam
03/28/2023, 9:29 PMMatthew Von-Maszewski
03/28/2023, 9:30 PMMatthew Von-Maszewski
03/28/2023, 9:31 PMAdam
03/28/2023, 9:32 PMMatthew Von-Maszewski
03/28/2023, 9:35 PMAdam
03/28/2023, 9:37 PMVampire
03/28/2023, 10:30 PMtestApi
in the Gradle userguide (while it indeed does not exist 😄)Vampire
03/28/2023, 10:31 PMtestApi
and also a reason why the test-fixtures
were added I guess.Vampire
03/28/2023, 10:32 PM```plugins {
id 'java-library'
}
apply plugin: 'java-library'```is redundant. You first apply the plugin properly the new way and then again the legacy way. You should actually not have any
apply plugin:
anymore except for very special cases of plugins that break the plugins { ... }
block when you are using Kotlin DSL.Matthew Von-Maszewski
03/30/2023, 9:58 PMMatthew Von-Maszewski
03/30/2023, 9:59 PM