Skip to content

Commit

Permalink
dokka to generate autogenerated lombak files
Browse files Browse the repository at this point in the history
  • Loading branch information
jeyanthanperiyasamy committed Dec 14, 2023
1 parent 8ebf0ff commit b7843d3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

// Top-level build file where you can add configuration options common to all sub-projects/modules.
import org.jetbrains.dokka.gradle.DokkaTask

buildscript {
ext {
Expand Down Expand Up @@ -37,6 +38,24 @@ plugins {
id("org.jetbrains.dokka") version "1.9.10"
}

// Note: To configure multi-project builds, you need
// to configure Partial tasks of the subprojects.
// See "Configuration example" section of documentation.
//tasks.withType(DokkaTask.class) {
// dokkaSourceSets {
// configureEach {
// documentedVisibilities.set(
// setOf(
// org.jetbrains.dokka.DokkaConfiguration.Visibility.PUBLIC, // Same for both Kotlin and Java
// org.jetbrains.dokka.DokkaConfiguration.Visibility.PRIVATE, // Same for both Kotlin and Java
// org.jetbrains.dokka.DokkaConfiguration.Visibility.PROTECTED, // Same for both Kotlin and Java
// org.jetbrains.dokka.DokkaConfiguration.Visibility.INTERNAL, // Kotlin-specific internal modifier
// org.jetbrains.dokka.DokkaConfiguration.Visibility.PACKAGE, // Java-specific package-private visibility
// )
// )
// }
// }
//}

allprojects {
configurations.all {
Expand Down
25 changes: 20 additions & 5 deletions config/kdoc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ task delombok {
classname: 'lombok.delombok.ant.Tasks$Delombok',
classpath: configurations.delombok.asPath)
ant.delombok(verbose: 'true', from: srcJava, to: "$buildDir/src-delomboked")
copy {
from "$buildDir/src-delomboked"
into "src/main/java"
}
}
}

Expand All @@ -41,8 +45,8 @@ dokkaJavadoc {
named("main") {
displayName.set(name)
outputDirectory = file("build/javadoc/$project.name-dokka")
sourceDirs = files("$buildDir/src-delomboked")
sourceRoots.setFrom(file("$buildDir/src-delomboked"))
// sourceDirs = files("$buildDir/src-delomboked")
// sourceRoots.setFrom(file("$buildDir/src-delomboked"))
reportUndocumented.set(false)
skipEmptyPackages.set(true)
skipDeprecated.set(false)
Expand All @@ -53,6 +57,12 @@ dokkaJavadoc {
suppress.set(false)
}
}
doLast {
exec {
workingDir project.rootDir
commandLine 'git', 'checkout', '.'
}
}
}

tasks.named("dokkaHtml").configure {
Expand All @@ -66,14 +76,19 @@ dokkaHtml {
dokkaSourceSets {
named("main") {
outputDirectory = file("build/html/$project.name-dokka")
sourceDirs = files("$buildDir/src-delomboked")
sourceRoots.setFrom(file("$buildDir/src-delomboked"))
// sourceDirs = files("$buildDir/src-delomboked")
// sourceRoots.setFrom(file("$buildDir/src-delomboked"))
noAndroidSdkLink.set(false)
includeNonPublic.set(true)
skipEmptyPackages.set(true)
reportUndocumented.set(true)
skipDeprecated.set(false)

}
}
doLast {
exec {
workingDir project.rootDir
commandLine 'git', 'checkout', '.'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
public class DeviceSigningVerifierApplicationPinCallbackTest extends BaseDeviceBindingTest {
protected final static String TREE = "device-verifier";
Expand Down Expand Up @@ -113,7 +115,11 @@ public void onCallbackReceived(Node node) {
Assert.assertNotNull(callback.getUserId());
Assert.assertNotNull(callback.getChallenge());

callback.sign(context, Collections.emptyMap(), new DefaultUserKeySelector(),
Map<String, String> map = new HashMap<>() {{
put("os", "value1");
}};

callback.sign(context, map, new DefaultUserKeySelector(),
deviceBindingAuthenticationType -> new ApplicationPinDeviceAuthenticator((prompt, fragmentActivity, $completion) -> APPLICATION_PIN.toCharArray()),
new FRListener<Void>() {
@Override
Expand Down

0 comments on commit b7843d3

Please sign in to comment.