plugins Ġ{ ĊĠ Ġid (" org . metab org . gradle . config . java - library ") ĊĠ Ġid (" org . metab org . cor on ium . bundle ") ĊĠ Ġ` maven - publish ` Ċ } Ċ Ċ dependencies Ġ{ ĊĠ Ġapi ( platform ( project (": complex . platform "))) ĊĠ Ġannotation Processor ( platform ( project (": complex . platform "))) ĊĊĠ Ġbundle Target Platform Api ( eclipse (" javax . inject ")) ĊĠ Ġbundle Target Platform Api ( eclipse (" org . eclipse . core . runtime ")) ĊĠ Ġbundle Target Platform Api ( eclipse (" org . eclipse . ui ")) ĊĊĠ Ġbundle Embed Implementation (" org . metab org : log . backend . slf 4 j ") ĊĠ Ġbundle Embed Implementation (" org . slf 4 j : slf 4 j - simple ") ĊĠ Ġbundle Embed Api ( project (": complex . sp oof ax ")) ĊĊĠ Ġcompile Only (" org . checker framework : checker - qual - android ") ĊĊĠ Ġannotation Processor (" com . google . d agger : d agger - compiler ") Ċ } Ċ Ċ // ĠFor ĠJava Ġlibraries Ġthat Ġare Ġembedded Ġinto Ġthe Ġbundle , Ġand Ġare Ġexported Ġ( i . e ., Ġbundle Embed Api ), Ġwe Ġneed Ġto Ġadd Ġan Ċ // ĠExport - Package Ġdirective Ġto Ġthe ĠJ AR Ġmanifest Ġthat Ġdetermines Ġwhich Ġpackages Ġshould Ġbe Ġexported . ĠOnly Ġclasses Ġfrom Ċ // Ġthese Ġpackages Ġwill Ġbe Ġembedded . ĠThe ĠB ND Ġplugin Ġwill Ġperform Ġthe Ġembedding . ĠTherefore , Ġthe ĠExport - Package Ċ // Ġsyntax Ġfrom ĠB ND Ġis Ġsupported : Ġhttps :// bnd . bnd tools . org / heads / export _ package . html Ċ val Ġexport Package Ġ= ĠlistOf ( ĊĠ Ġ// ĠRegular Ġpackages Ġto Ġbe Ġexported . ĠNote Ġthat Ġthis Ġexport Ġcannot Ġbe Ġwritten Ġin ĠMETA - INF / MAN IFEST . MF , Ġotherwise Ġits ĊĠ Ġ// ĠExport - Package Ġdirective Ġwould Ġoverwrite Ġthis Ġone , Ġleading Ġto Ġembedded Ġdependencies Ġnot Ġbeing Ġexported . ĊĠ Ġ" mb . complex . sp oof ax . eclipse ", ĊĠ Ġ// ĠEmbedded Ġpackages Ġto Ġbe Ġexported . ĠUsing Ġ'; provider = mb ; mandatory := provider ' Ġto Ġprevent Ġthese Ġpackages Ġfrom Ġbeing ĊĠ Ġ// Ġimported Ġwith Ġa Ġregular ĠImport - Package Ġdirective . ĠThey Ġcan Ġonly Ġbe Ġused Ġwith Ġa ĠRequire - Bundle Ġdependency Ġto Ġthis ĊĠ Ġ// Ġbundle , Ġor Ġby Ġqual ifying Ġan ĠImport - Package Ġdirective Ġwith Ġ'; provider = mb '. ĊĠ Ġ" mb . complex . sp oof ax .*; provider = mb ; mandatory := provider ", ĊĠ Ġ" mb . log . api .*; provider = mb ; mandatory := provider ", ĊĠ Ġ" mb . pie .*; provider = mb ; mandatory := provider ", ĊĠ Ġ" d agger .*; provider = mb ; mandatory := provider " Ċ ) Ċ // ĠL ik ew ise , Ġfor ĠJava Ġlibraries Ġthat Ġare Ġembedded Ġinto Ġthe Ġbundle , Ġbut Ġnot Ġexported Ġ( i . e ., Ġbundle Embed Implementation ), Ċ // Ġwe Ġneed Ġto Ġadd Ġa ĠPrivate - Package Ġdirective Ġto Ġthe ĠJ AR Ġmanifest Ġthat Ġdetermines Ġwhich Ġpackages Ġshould Ġbe Ġincluded . Ċ // ĠOnly Ġclasses Ġfrom Ġthese Ġpackages Ġwill Ġbe Ġembedded . ĠAgain , Ġthe ĠB ND Ġplugin Ġwill Ġperform Ġthe Ġembedding . ĠTherefore , Ġthe Ċ // ĠPrivate - Package Ġsyntax Ġfrom ĠB ND Ġis Ġsupported : Ġhttps :// bnd . bnd tools . org / heads / private _ package . html Ċ val Ġprivate Package Ġ= ĠlistOf ( ĊĠ Ġ" mb . log . slf 4 j .* ", ĊĠ Ġ" org . slf 4 j .* " Ċ ) Ċ tasks Ġ{ ĊĠ Ġ" jar "( Jar :: class ) Ġ{ ĊĠĠĠ Ġmanifest Ġ{ ĊĠĠĠĠĠ Ġattributes ( ĊĠĠĠĠĠĠĠ Ġ// ĠPass Ġthe Ġabove Ġlists Ġas Ġthe ĠExport - Package Ġand ĠPrivate - Package Ġdirectives Ġof Ġthe ĠJ AR Ġmanifest . ĊĠĠĠĠĠĠĠ ĠPair (" Export - Package ", Ġexport Package . join ToString (", Ġ" )), ĊĠĠĠĠĠĠĠ ĠPair (" Private - Package ", Ġprivate Package . join ToString (", Ġ")) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ