@@ -16,6 +16,7 @@ import kotlinx.coroutines.test.runTest
1616import org.junit.jupiter.api.BeforeEach
1717import org.junit.jupiter.api.Test
1818import org.junit.jupiter.api.io.TempDir
19+ import xyz.block.artifactswap.core.config.ArtifactSwapConfig
1920import xyz.block.artifactswap.core.maven.Dependencies
2021import xyz.block.artifactswap.core.maven.Dependency
2122import xyz.block.artifactswap.core.maven.DependencyManagement
@@ -63,6 +64,8 @@ class LocalArtifactRepositoryTest {
6364 " features_open-tickets-v2_home_fake" ,
6465 " features_open-tickets-v2_home_impl" ,
6566 )
67+ private val testMavenGroup = " com.squareup.register.sandbags"
68+ private val config = ArtifactSwapConfig (primaryArtifactsMavenGroup = testMavenGroup)
6669
6770 @BeforeEach
6871 fun setUp () {
@@ -79,6 +82,7 @@ class LocalArtifactRepositoryTest {
7982 xmlMapper = xmlMapper,
8083 ioContext = EmptyCoroutineContext ,
8184 mavenDirectory = fakeM2Root,
85+ config = config,
8286 )
8387 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(fakeBom)
8488 assertTrue(installedArtifacts.getOrThrow().isEmpty())
@@ -94,12 +98,12 @@ class LocalArtifactRepositoryTest {
9498 dependentProjects =
9599 listOf (
96100 Dependency (
97- groupId = " com.squareup.register.sandbags " ,
101+ groupId = testMavenGroup ,
98102 artifactId = " features_open-tickets-v2_create-ticket_impl-tablet" ,
99103 version = " asdf1132" ,
100104 ),
101105 Dependency (
102- groupId = " com.squareup.register.sandbags " ,
106+ groupId = testMavenGroup ,
103107 artifactId = " features_open-tickets-v2_create-ticket_anvil-wiring" ,
104108 version = " a23kh1" ,
105109 ),
@@ -111,6 +115,7 @@ class LocalArtifactRepositoryTest {
111115 xmlMapper = xmlMapper,
112116 ioContext = EmptyCoroutineContext ,
113117 mavenDirectory = fakeM2Root,
118+ config = config,
114119 )
115120 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
116121 assertTrue(installedArtifacts.getOrThrow().isEmpty())
@@ -126,12 +131,12 @@ class LocalArtifactRepositoryTest {
126131 dependentProjects =
127132 listOf (
128133 Dependency (
129- groupId = " com.squareup.register.sandbags " ,
134+ groupId = testMavenGroup ,
130135 artifactId = fakeArtifactDirectoryNames[0 ],
131136 version = " asdf1132" ,
132137 ),
133138 Dependency (
134- groupId = " com.squareup.register.sandbags " ,
139+ groupId = testMavenGroup ,
135140 artifactId = fakeArtifactDirectoryNames[1 ],
136141 version = " a23kh1" ,
137142 ),
@@ -158,6 +163,7 @@ class LocalArtifactRepositoryTest {
158163 xmlMapper = xmlMapper,
159164 ioContext = EmptyCoroutineContext ,
160165 mavenDirectory = fakeM2Root,
166+ config = config,
161167 )
162168 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
163169 assertTrue(installedArtifacts.getOrThrow().isEmpty())
@@ -173,12 +179,12 @@ class LocalArtifactRepositoryTest {
173179 dependentProjects =
174180 listOf (
175181 Dependency (
176- groupId = " com.squareup.register.sandbags " ,
182+ groupId = testMavenGroup ,
177183 artifactId = fakeArtifactDirectoryNames[0 ],
178184 version = " hash1" ,
179185 ),
180186 Dependency (
181- groupId = " com.squareup.register.sandbags " ,
187+ groupId = testMavenGroup ,
182188 artifactId = fakeArtifactDirectoryNames[1 ],
183189 version = " hash2" ,
184190 ),
@@ -194,6 +200,7 @@ class LocalArtifactRepositoryTest {
194200 xmlMapper = xmlMapper,
195201 ioContext = EmptyCoroutineContext ,
196202 mavenDirectory = fakeM2Root,
203+ config = config,
197204 )
198205 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
199206 val expected =
@@ -211,17 +218,17 @@ class LocalArtifactRepositoryTest {
211218 dependentProjects =
212219 listOf (
213220 Dependency (
214- groupId = " com.squareup.register.sandbags " ,
221+ groupId = testMavenGroup ,
215222 artifactId = fakeArtifactDirectoryNames[0 ],
216223 version = " hash1" ,
217224 ),
218225 Dependency (
219- groupId = " com.squareup.register.sandbags " ,
226+ groupId = testMavenGroup ,
220227 artifactId = fakeArtifactDirectoryNames[1 ],
221228 version = " hash2" ,
222229 ),
223230 Dependency (
224- groupId = " com.squareup.register.sandbags " ,
231+ groupId = testMavenGroup ,
225232 artifactId = fakeArtifactDirectoryNames[2 ],
226233 version = " hash3" ,
227234 ),
@@ -244,6 +251,7 @@ class LocalArtifactRepositoryTest {
244251 xmlMapper = xmlMapper,
245252 ioContext = EmptyCoroutineContext ,
246253 mavenDirectory = fakeM2Root,
254+ config = config,
247255 )
248256 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
249257 val expected =
@@ -264,12 +272,12 @@ class LocalArtifactRepositoryTest {
264272 dependentProjects =
265273 listOf (
266274 Dependency (
267- groupId = " com.squareup.register.sandbags " ,
275+ groupId = testMavenGroup ,
268276 artifactId = fakeArtifactDirectoryNames[0 ],
269277 version = " hash1" ,
270278 ),
271279 Dependency (
272- groupId = " com.squareup.register.sandbags " ,
280+ groupId = testMavenGroup ,
273281 artifactId = fakeArtifactDirectoryNames[1 ],
274282 version = " hash2" ,
275283 ),
@@ -295,6 +303,7 @@ class LocalArtifactRepositoryTest {
295303 xmlMapper = xmlMapper,
296304 ioContext = EmptyCoroutineContext ,
297305 mavenDirectory = fakeM2Root,
306+ config = config,
298307 )
299308 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
300309 val expected =
@@ -312,7 +321,7 @@ class LocalArtifactRepositoryTest {
312321 dependentProjects =
313322 listOf (
314323 Dependency (
315- groupId = " com.squareup.register.sandbags " ,
324+ groupId = testMavenGroup ,
316325 artifactId = fakeArtifactDirectoryNames[0 ],
317326 version = " hash1" ,
318327 )
@@ -333,6 +342,7 @@ class LocalArtifactRepositoryTest {
333342 xmlMapper = xmlMapper,
334343 ioContext = EmptyCoroutineContext ,
335344 mavenDirectory = fakeM2Root,
345+ config = config,
336346 )
337347 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
338348 val expected =
@@ -350,12 +360,12 @@ class LocalArtifactRepositoryTest {
350360 dependentProjects =
351361 listOf (
352362 Dependency (
353- groupId = " com.squareup.register.sandbags " ,
363+ groupId = testMavenGroup ,
354364 artifactId = fakeArtifactDirectoryNames[0 ],
355365 version = " hash1" ,
356366 ),
357367 Dependency (
358- groupId = " com.squareup.register.sandbags " ,
368+ groupId = testMavenGroup ,
359369 artifactId = fakeArtifactDirectoryNames[1 ],
360370 version = " hash2" ,
361371 ),
@@ -371,6 +381,7 @@ class LocalArtifactRepositoryTest {
371381 xmlMapper = xmlMapper,
372382 ioContext = EmptyCoroutineContext ,
373383 mavenDirectory = fakeM2Root,
384+ config = config,
374385 )
375386 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
376387 assertTrue(installedArtifacts.getOrThrow().all { it.projectPath.startsWith(" :" ) })
@@ -386,12 +397,12 @@ class LocalArtifactRepositoryTest {
386397 dependentProjects =
387398 listOf (
388399 Dependency (
389- groupId = " com.squareup.register.sandbags " ,
400+ groupId = testMavenGroup ,
390401 artifactId = fakeArtifactDirectoryNames[0 ],
391402 version = " hash1" ,
392403 ),
393404 Dependency (
394- groupId = " com.squareup.register.sandbags " ,
405+ groupId = testMavenGroup ,
395406 artifactId = fakeArtifactDirectoryNames[1 ],
396407 version = " hash2" ,
397408 ),
@@ -403,12 +414,12 @@ class LocalArtifactRepositoryTest {
403414 dependentProjects =
404415 listOf (
405416 Dependency (
406- groupId = " com.squareup.register.sandbags " ,
417+ groupId = testMavenGroup ,
407418 artifactId = fakeArtifactDirectoryNames[0 ],
408419 version = " hash3" ,
409420 ),
410421 Dependency (
411- groupId = " com.squareup.register.sandbags " ,
422+ groupId = testMavenGroup ,
412423 artifactId = fakeArtifactDirectoryNames[1 ],
413424 version = " hash4" ,
414425 ),
@@ -439,6 +450,7 @@ class LocalArtifactRepositoryTest {
439450 xmlMapper = xmlMapper,
440451 ioContext = EmptyCoroutineContext ,
441452 mavenDirectory = fakeM2Root,
453+ config = config,
442454 )
443455 val installedArtifacts = localArtifactRepository.getInstalledArtifacts(bom.getOrThrow())
444456 val expected =
@@ -457,7 +469,7 @@ class LocalArtifactRepositoryTest {
457469 ): Result <Project > = runCatching {
458470 val mavenPom =
459471 Project (
460- groupId = " com.squareup.register.sandbags " ,
472+ groupId = testMavenGroup ,
461473 artifactId = " features_open-tickets-v2_create-ticket_impl-tablet" ,
462474 version = bomVersion,
463475 name = " features_open-tickets-v2_create-ticket_impl-tablet" ,
0 commit comments