File tree Expand file tree Collapse file tree 3 files changed +4
-13
lines changed
Expand file tree Collapse file tree 3 files changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,3 @@ dependencies {
4747 implementation(libs.zxing.javase)
4848 implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) // https://github.com/gradle/gradle/issues/15383
4949}
50-
51- sourceSets {
52- named(" main" ) {
53- java {
54- srcDir(" ../theme-contract/src/main/java" )
55- setIncludes(listOf (" com/orange/ouds/theme/OudsVersion.kt" ))
56- }
57- }
58- }
Original file line number Diff line number Diff line change 1+ .. / .. / .. / .. / .. / .. / .. / .. / theme- contract/ src/ main/ java/ com/ orange/ ouds/ theme/ OudsVersion .kt
Original file line number Diff line number Diff line change 1111 */
1212
1313import com.github.mustachejava.DefaultMustacheFactory
14+ import com.orange.ouds.theme.OudsVersion
1415import java.io.FileOutputStream
1516import java.io.PrintWriter
1617import kotlin.reflect.full.declaredMemberProperties
@@ -22,8 +23,7 @@ tasks.register<DefaultTask>("prepareDocumentation") {
2223 // Retrieve OudsVersion.Component object and fill the table in core/Module.md with the component design versions
2324 val coreModuleDocumentationWriter = PrintWriter (FileOutputStream (" core/Module.md" ))
2425 // Build a map in order to loop through all component versions in core Module.mustache
25- val componentVersions = Class .forName(" com.orange.ouds.theme.OudsVersion${' $' } Component" )
26- .kotlin
26+ val componentVersions = OudsVersion .Component ::class
2727 .declaredMemberProperties
2828 .map { property ->
2929 val name = property.name
@@ -46,11 +46,10 @@ tasks.register<DefaultTask>("prepareDocumentation") {
4646 " theme-sosh"
4747 )
4848 // Use OudsVersion.Tokens directly in various Module.mustache files
49- val tokensVersions = Class .forName(" com.orange.ouds.theme.OudsVersion${' $' } Tokens" ).kotlin.objectInstance
5049 moduleDocumentationDirectories.forEach { moduleDocumentationDirectory ->
5150 val moduleDocumentationWriter = PrintWriter (FileOutputStream (" $moduleDocumentationDirectory /Module.md" ))
5251 mustacheFactory.compile(" $moduleDocumentationDirectory /Module.mustache" )
53- .execute(moduleDocumentationWriter, tokensVersions )
52+ .execute(moduleDocumentationWriter, OudsVersion . Tokens )
5453 .flush()
5554 }
5655 }
You can’t perform that action at this time.
0 commit comments