Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/unknown Android classes #76

Merged
merged 27 commits into from
May 29, 2023
Merged

Fix/unknown Android classes #76

merged 27 commits into from
May 29, 2023

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented May 21, 2023

Hopefully will improve #71

  • Set up Android integration test
  • Try triggering Android artifact transformations (as discovered in AndroidX classes produce Error class: unknown class in generated HTML #71 (comment))
  • tidy up code in Android/Kotlin adapters
  • improve setting up of Dokka test projects (so local.properties is generated properly)
  • Fix Failed to install the following Android SDK packages as some licences have not been accepted. error on GitHub action

Significant changes

  • DokkaSourceSetIdSpec.sourceSetName mutability has been deprecated. Instances of this class is used in Sets, and so its hashcode/equals must remain constant.
  • Minimum Android version updated to 4.2.2

@aSemy
Copy link
Contributor Author

aSemy commented May 21, 2023

hey @EdricChan03 👋 Are you able to check out this branch, publish to to Maven Local, and give it a go in your project? I think it should fix your issue.

(the tests are failing because of a inconsequential difference in the generated HTML)

@EdricChan03
Copy link
Contributor

EdricChan03 commented May 22, 2023

It seems that the index.html isn't correctly generated? (Or rather, it appears to be in the wrong directory) It fails with the following exception:

Execution failed for task ':dokkatooGeneratePublicationHtml'.
> A failure occurred while executing dev.adamko.dokkatoo.workers.DokkaGeneratorWorker
   > /<...>/androidx-ktx-extras/build/dokkatoo/html/androidx/browser/browser-ktx/index.html

This is what the build directory structure looks like for that particular module:

Build directory structure for browser-ktx

Not sure if it's something to do with this config:

dokkatoo {
    // TODO: Remove
    dokkatooPublicationDirectory.set(layout.buildDirectory.dir("dokkatoo"))
    dokkatooConfigurationsDirectory.set(layout.buildDirectory.dir("dokkatoo-config"))
}

I don't see any <ERROR class> thingy in the HTML output though, so I guess that's a partial success 🥳

Screenshot of Dokkatoo output

EDIT: Build Scan for index.html issue

@aSemy
Copy link
Contributor Author

aSemy commented May 22, 2023

Thanks a lot for checking! It's a good sign.

I'm not sure what the problem might be with the index.html file. Possibly it's a bug from another change I've made since v1.3.0.

I'll finish up the work in this PR and if there's another bug to fix, then we can make a new issue for it.

@aSemy aSemy added this to the v1.4.0 milestone May 22, 2023
aSemy added 15 commits May 22, 2023 12:18
…e.properties` files can be configured using a DSL
- bump Android to 4.2.2 (because there's no Gradle plugin ID in previous versions, unknown reasons...)
- lots of hacking around in DokkatooAndroidAdapter to fetch the files (the trick seems to be removing withVariantReselection())
- try using resolvedArtifacts instead of artifactFiles (might help with
- hack around with the Dokka test project setup Gradle task (should be improved)
@aSemy aSemy force-pushed the fix/unknown_android_classes branch from 5d34f1e to 0600a2f Compare May 22, 2023 10:19
…lasses

# Conflicts:
#	buildSrc/src/main/kotlin/buildsrc/conventions/maven-publish-test.gradle.kts
#	modules/dokkatoo-plugin-integration-tests/build.gradle.kts
@aSemy aSemy marked this pull request as ready for review May 29, 2023 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants