package Ġo sgi 2 gradle . projects gradle Ċ Ċ import Ġo sgi 2 gradle . Ec lipse Bundle Gradle Project Ċ import Ġjava . io . FileInputStream Ċ import Ġjava . io . OutputStream Writer Ċ import Ġjava . util .* Ċ import Ġjava . util . stream . Collectors Ċ Ċ fun ĠEclipse Bundle Gradle Project . declare Project Source Sets ( projects Gradle Writer : ĠOutputStream Writer ) Ġ{ ĊĠĠĠ Ġif Ġ( bundle Properties . source Directories . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġprojects Gradle Writer ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append ("\ ts ource Sets . main . java . src Dirs Ġ= Ġ[ ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append ( bundle Properties . source Directories . join ToString (" ',' ", Ġ"'", Ġ"' ")) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append (" ]\ r \ n ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġprojects Gradle Writer ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. append ("\ ts ource Sets . main . resources . src Dirs Ġ= Ġsource Sets . main . java . src Dirs \ r \ n ") ĊĊĠĠĠ Ġif Ġ( bundle Properties . j ars To Include . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġprojects Gradle Writer ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append ("\ t jar . from Ġfiles (" ). append ( bundle Properties . j ars To Include . join ToString (" ',' ", Ġ"'", Ġ"' ")) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append (" ). collect Ġ{ Ġzip Tree ( it ) Ġ}\ r \ n ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġif Ġ( bundle Properties . non J ars To Include . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġprojects Gradle Writer ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append ("\ t jar . from Ġfile Tree ( project Dir ) Ġ{ Ġincludes Ġ= Ġ[ ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append ( bundle Properties . non J ars To Include . join ToString (" ',' ", Ġ"'", Ġ"' ")) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. append (" ] Ġ}\ r \ n ") ĊĠĠĠ Ġ} Ċ } Ċ