/* Ċ Ġ* ĠCopyright Ġ 2 0 1 0 - 2 0 2 1 ĠJetBrains Ġs . r . o . Ġand ĠKotlin ĠProgramming ĠLanguage Ġcontributors . Ċ Ġ* ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe Ġlicense / LICENSE . txt Ġfile . Ċ Ġ*/ Ċ Ċ package Ġorg . jetbrains . kotlin . gradle Ċ Ċ import Ġorg . junit . Test Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assertFalse Ċ import Ġkotlin . test . assertTrue Ċ Ċ @ Opt In ( Experimental Gradle Tool ing Api :: class ) Ċ class ĠKotlin M pp Gradle Model Extensions Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġresolve Declared Dep ends On Source Sets () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcommon Main Ġ= Ġcreate Kotlin Source Set (" common Main ") ĊĠĠĠĠĠĠĠ Ġval Ġapple Main Ġ= Ġcreate Kotlin Source Set (" apple Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Main Ġ= Ġcreate Kotlin Source Set (" macos Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġios Main Ġ= Ġcreate Kotlin Source Set (" ios Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ", Ġ" common Main ")) ĊĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġcreate Kotlin MP PG rad le Model ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsource Sets Ġ= Ġset Of ( common Main , Ġapple Main , Ġmac os Main , Ġios Main ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġempty Set (), Ġmodel . resolve Declared Dep ends On Source Sets ( common Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġno Ġdeclared Ġdependency Ġsource Ġsets Ġfor Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( common Main ), Ġmodel . resolve Declared Dep ends On Source Sets ( apple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġonly Ġdeclared Ġdependency Ġfor Ġ' apple Main '" ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( apple Main , Ġcommon Main ), Ġmodel . resolve Declared Dep ends On Source Sets ( ios Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġonly Ġdeclared Ġdependency Ġfor Ġ' ios Main '" ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` resolve Declared Dep ends On Source Sets Ġis Ġgrace ful Ġfor Ġmissing Ġsource Ġsets `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcommon Main Ġ= Ġcreate Kotlin Source Set (" common Main ") ĊĠĠĠĠĠĠĠ Ġval Ġmac os Main Ġ= Ġcreate Kotlin Source Set (" macos Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ", Ġ" missing ")) ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġcreate Kotlin MP PG rad le Model ( source Sets Ġ= Ġset Of ( common Main , Ġmac os Main )) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( common Main ), Ġmodel . resolve Declared Dep ends On Source Sets ( macos Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġdeclared Dependency Source Sets Ġto Ġignore Ġmissing Ġdependency Ġsource Ġset " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġresolve All Dep ends On Source Sets () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcommon Main Ġ= Ġcreate Kotlin Source Set (" common Main ") ĊĠĠĠĠĠĠĠ Ġval Ġapple Main Ġ= Ġcreate Kotlin Source Set (" apple Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġx 6 4 Main Ġ= Ġcreate Kotlin Source Set (" x 6 4 Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Main Ġ= Ġcreate Kotlin Source Set (" macos Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os X 6 4 Main Ġ= Ġcreate Kotlin Source Set (" macos X 6 4 Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ", Ġ" x 6 4 Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Arm 6 4 Main Ġ= Ġcreate Kotlin Source Set (" macos Arm 6 4 Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ")) ĊĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġcreate Kotlin MP PG rad le Model ( source Sets Ġ= Ġset Of ( common Main , Ġapple Main , Ġx 6 4 Main , Ġmac os Main , Ġmac os X 6 4 Main , Ġmac os Arm 6 4 Main )) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( apple Main , Ġx 6 4 Main , Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . resolve All Dep ends On Source Sets ( macos X 6 4 Main ), ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( apple Main , Ġx 6 4 Main , Ġcommon Main ). sorted By Ġ{ Ġit . name Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . resolve All Dep ends On Source Sets ( macos X 6 4 Main ). sorted By Ġ{ Ġit . name Ġ}. toList (), ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( apple Main , Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . resolve All Dep ends On Source Sets ( macos Arm 6 4 Main ). toSet (), ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( common Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . resolve All Dep ends On Source Sets ( apple Main ). toSet (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġonly Ġ' common Main ' Ġfor Ġ' apple Main '" ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġempty Set (), Ġmodel . resolve All Dep ends On Source Sets ( common Main ). toSet (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġempty Ġset Ġfor Ġ' common Main '" ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` res olving Ġsource Ġsets Ġwith Ġself Ġreferences Ġor Ġloops `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġa Ġ= Ġcreate Kotlin Source Set (" a ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of ("")) ĊĠĠĠĠĠĠĠ Ġval Ġb Ġ= Ġcreate Kotlin Source Set (" b ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" a ", Ġ" c ")) Ġ// Ġloop Ġd Ġ-> Ġc Ġ-> Ġb Ġ-> Ġc ĊĠĠĠĠĠĠĠ Ġval Ġc Ġ= Ġcreate Kotlin Source Set (" c ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" b ", Ġ" c ")) Ġ// Ġself Ġreference Ġc Ġ-> Ġc ĊĠĠĠĠĠĠĠ Ġval Ġd Ġ= Ġcreate Kotlin Source Set (" d ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" c ")) ĊĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġcreate Kotlin MP PG rad le Model ( source Sets Ġ= Ġset Of ( a , Ġb , Ġc , Ġd )) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( a , Ġb , Ġc ). sorted By Ġ{ Ġit . name Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . resolve All Dep ends On Source Sets ( d ). sorted By Ġ{ Ġit . name Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġdependency Ġloop Ġto Ġbe Ġhandled Ġgrace fully " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( a , Ġb , Ġc ). sorted By Ġ{ Ġit . name Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . resolve All Dep ends On Source Sets ( c ). sorted By Ġ{ Ġit . name Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġself Ġdependency Ġto Ġbe Ġresolved Ġfor Ġ' resolve All Dep ends On Source Sets '" ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( b , Ġc ). sorted By Ġ{ Ġit . name Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . resolve Declared Dep ends On Source Sets ( c ). sorted By Ġ{ Ġit . name Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġself Ġdependency Ġto Ġbe Ġresolved Ġby Ġ' resolve Declared Dep ends On Source Sets '" ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġis Dep ends On () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcommon Main Ġ= Ġcreate Kotlin Source Set (" common Main ") ĊĠĠĠĠĠĠĠ Ġval Ġapple Main Ġ= Ġcreate Kotlin Source Set (" apple Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġx 6 4 Main Ġ= Ġcreate Kotlin Source Set (" x 6 4 Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os X 6 4 Main Ġ= Ġcreate Kotlin Source Set (" macos X 6 4 Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ", Ġ" x 6 4 Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Arm 6 4 Main Ġ= Ġcreate Kotlin Source Set (" macos Arm 6 4 Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ")) ĊĊĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġcreate Kotlin MP PG rad le Model ( source Sets Ġ= Ġset Of ( common Main , Ġapple Main , Ġx 6 4 Main , Ġmac os X 6 4 Main )) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġapple Main , Ġto Ġ= Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġapple Main Ġto Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġx 6 4 Main , Ġto Ġ= Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġx 6 4 Main Ġto Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os X 6 4 Main , Ġto Ġ= Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġmac os X 6 4 Main Ġto Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os X 6 4 Main , Ġto Ġ= Ġapple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġmac os X 6 4 Main Ġto Ġapple Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os X 6 4 Main , Ġto Ġ= Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġmac os X 6 4 Main Ġto Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os X 6 4 Main , Ġto Ġ= Ġapple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġmac os X 6 4 Main Ġto Ġapple Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os X 6 4 Main , Ġto Ġ= Ġx 6 4 Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġmac os X 6 4 Main Ġto Ġx 6 4 Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os Arm 6 4 Main , Ġto Ġ= Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġmac os Arm 6 4 Main Ġto Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os Arm 6 4 Main , Ġto Ġ= Ġapple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġis Dep ends On Ġfrom Ġmac os Arm 6 4 Main Ġto Ġapple Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġmac os Arm 6 4 Main , Ġto Ġ= Ġx 6 4 Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġfalse Ġis Dep ends On Ġfrom Ġmac os Arm 6 4 Ġto Ġx 6 4 Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġfor Ġ( source Set Ġin Ġmodel . source Sets ByName . values ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġcommon Main , Ġto Ġ= Ġsource Set ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġfalse Ġis Dep ends On Ġfrom Ġcommon Main Ġto Ġ${ source Set . name }" ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . is Dep ends On ( from Ġ= Ġsource Set , Ġto Ġ= Ġsource Set ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġfalse Ġis Dep ends On Ġfor Ġsame Ġsource Ġset " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġsource Set . is Dep ends On ( model , Ġsource Set ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġfalse Ġis Dep ends On Ġfor Ġsame Ġsource Ġset " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcompilation Dep ends On Source Set () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcommon Main Ġ= Ġcreate Kotlin Source Set (" common Main ") ĊĠĠĠĠĠĠĠ Ġval Ġapple Main Ġ= Ġcreate Kotlin Source Set (" apple Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Main Ġ= Ġcreate Kotlin Source Set (" macos Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġios Main Ġ= Ġcreate Kotlin Source Set (" ios Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ")) ĊĊĠĠĠĠĠĠĠ Ġval Ġmetadata Compilation Ġ= Ġcreate Kotlin Compilation ( default Source Sets Ġ= Ġset Of ( common Main )) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Main Compilation Ġ= Ġcreate Kotlin Compilation ( default Source Sets Ġ= Ġset Of ( macos Main )) ĊĠĠĠĠĠĠĠ Ġval Ġios Main Compilation Ġ= Ġcreate Kotlin Compilation ( default Source Sets Ġ= Ġset Of ( ios Main )) ĊĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġcreate Kotlin MP PG rad le Model ( source Sets Ġ= Ġset Of ( common Main , Ġapple Main , Ġmac os Main , Ġios Main )) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( ios Main Compilation , Ġios Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġios Main Compilation Ġdepending Ġon Ġios Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( ios Main Compilation , Ġapple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġios Main Compilation Ġdepending Ġon Ġapple Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( ios Main Compilation , Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġios Main Compilation Ġdepending Ġon Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( ios Main Compilation , Ġmac os Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġios Main Compilation Ġ* not * Ġdepending Ġon Ġmac os Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( macos Main Compilation , Ġmac os Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmac os Main Compilation Ġdepending Ġon Ġmac os Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( macos Main Compilation , Ġapple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmac os Main Compilation Ġdepending Ġon Ġapple Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( macos Main Compilation , Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmac os Main Compilation Ġdepending Ġon Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( macos Main Compilation , Ġios Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmac os Main Compilation Ġ* not * Ġdepending Ġon Ġios Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( metadata Compilation , Ġcommon Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmetadata Compilation Ġdepending Ġon Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( metadata Compilation , Ġapple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmetadata Compilation Ġ* not * Ġdepending Ġon Ġapple Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( metadata Compilation , Ġmac os Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmetadata Compilation Ġ* not * Ġdepending Ġon Ġmac os Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertFalse ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . compilation Dep ends On Source Set ( metadata Compilation , Ġios Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġmetadata Compilation Ġ* not * Ġdepending Ġon Ġios Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget Comp il ations () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcommon Main Ġ= Ġcreate Kotlin Source Set (" common Main ") ĊĠĠĠĠĠĠĠ Ġval Ġapple Main Ġ= Ġcreate Kotlin Source Set (" apple Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" common Main ")) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Main Ġ= Ġcreate Kotlin Source Set (" macos Main ", Ġdeclared Dep ends On Source Sets Ġ= Ġset Of (" apple Main ")) ĊĊĠĠĠĠĠĠĠ Ġval Ġmetadata Compilation Ġ= Ġcreate Kotlin Compilation ( default Source Sets Ġ= Ġset Of ( common Main )) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Main Compilation Ġ= Ġcreate Kotlin Compilation ( default Source Sets Ġ= Ġset Of ( macos Main )) ĊĊĠĠĠĠĠĠĠ Ġval Ġmetadata Target Ġ= Ġcreate Kotlin Target (" metadata ", Ġcompil ations Ġ= Ġset Of ( metadata Compilation )) ĊĠĠĠĠĠĠĠ Ġval Ġmac os Target Ġ= Ġcreate Kotlin Target (" macos ", Ġcompil ations Ġ= Ġset Of ( macos Main Compilation )) ĊĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġcreate Kotlin MP PG rad le Model ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsource Sets Ġ= Ġset Of ( common Main , Ġapple Main , Ġmac os Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtargets Ġ= Ġset Of ( metadata Target , Ġmac os Target ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( metadata Compilation , Ġmac os Main Compilation ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodel . get Comp il ations ( common Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġcorrect Ġcompil ations Ġfor Ġcommon Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( macos Main Compilation ), Ġmodel . get Comp il ations ( apple Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġcorrect Ġcompil ations Ġfor Ġapple Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Of ( macos Main Compilation ), Ġmodel . get Comp il ations ( macos Main ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" Expected Ġcorrect Ġcompil ations Ġfor Ġmac os Main " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ