import Ġcom . datadog . gradle . plugin . apis urface . Api Surface Plugin Ċ import Ġorg . jetbrains . kotlin . gradle . tasks . Kotlin Compile Ċ Ċ val Ġgenerate R um Models Task Name Ġ= Ġ" generate R um Models FromJson " Ċ Ċ tasks . register ( ĊĠĠĠ Ġgenerate R um Models Task Name , ĊĠĠĠ Ġcom . datadog . gradle . plugin . json schema . Generate Json Schema Task :: class . java Ċ ) Ġ{ ĊĠĠĠ Ġinput DirPath Ġ= Ġ" src / main / json / rum " ĊĠĠĠ Ġtarget PackageName Ġ= Ġ" com . datadog . android . rum . model " ĊĠĠĠ Ġignored Files Ġ= ĠarrayOf ("_ common - schema . json ") ĊĠĠĠ Ġinput Name Mapping Ġ= Ġmap Of ( ĊĠĠĠĠĠĠĠ Ġ" action - schema . json " Ġto Ġ" ActionEvent ", ĊĠĠĠĠĠĠĠ Ġ" error - schema . json " Ġto Ġ" Error Event ", ĊĠĠĠĠĠĠĠ Ġ" resource - schema . json " Ġto Ġ" Resource Event ", ĊĠĠĠĠĠĠĠ Ġ" view - schema . json " Ġto Ġ" View Event ", ĊĠĠĠĠĠĠĠ Ġ" long _ task - schema . json " Ġto Ġ" Long Task Event " ĊĠĠĠ Ġ) Ċ } Ċ Ċ after Evaluate Ġ{ ĊĠĠĠ Ġtasks . find ByName ( Api Surface Plugin . TASK _ GEN _ API _ SURFACE ) ĊĠĠĠĠĠĠĠ Ġ? . depends On ( generate R um Models Task Name ) ĊĠĠĠ Ġtasks . with Type ( Kotlin Compile :: class . java ) Ġ{ Ġdepends On ( generate R um Models Task Name ) Ġ} Ċ } Ċ