-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
367 changed files
with
15,468 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# https://github.com/alexkaratarakis/gitattributes | ||
|
||
* text=auto | ||
|
||
# The above will handle all files NOT found below | ||
|
||
*.json text | ||
*.toml text | ||
*.xml text | ||
*.yaml text | ||
*.yml text | ||
.editorconfig text | ||
.env text | ||
|
||
# Documentation | ||
*.md text diff=markdown | ||
*.txt text | ||
LICENSE text | ||
|
||
# JVM | ||
*.java text diff=java | ||
*.kt text diff=kotlin | ||
*.kts text diff=kotlin | ||
*.properties text | ||
*.jar binary | ||
|
||
|
||
# Linux start script should use lf | ||
gradlew text eol=lf | ||
*.bash text eol=lf | ||
*.sh text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
*.cmd text eol=crlf | ||
|
||
# SVG treated as an asset (binary) by default. | ||
*.svg text | ||
|
||
# Exclude external libs from GitHub language stats https://github.com/github/linguist/blob/v7.24.1/docs/overrides.md | ||
examples/** linguist-documentation | ||
examples/*/dokka linguist-vendored | ||
modules/dokkatoo-plugin-integration-tests/projects/**dokka/ linguist-vendored | ||
modules/dokkatoo-plugin-integration-tests/projects/**dokkatoo/ linguist-documentation | ||
|
||
# Exclude files from exporting | ||
|
||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.gitkeep export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
### Gradle ### | ||
.gradle | ||
build/ | ||
|
||
!gradle/wrapper/gradle-wrapper.jar | ||
!gradle/wrapper/gradle-wrapper.properties | ||
|
||
|
||
### Kotlin/JVM ### | ||
*.class | ||
*.log | ||
|
||
hs_err_pid* | ||
replay_pid* | ||
*.hprof | ||
|
||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
|
||
### IntelliJ ### | ||
.idea/** | ||
!.idea/codeStyles/ | ||
!.idea/codeStyles/** | ||
|
||
|
||
### Eclipse ### | ||
.metadata | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
.settings/ | ||
.loadpath | ||
.recommenders | ||
.classpath | ||
|
||
.apt_generated/ | ||
.apt_generated_test/ | ||
.project | ||
|
||
|
||
### Linux ### | ||
*~ | ||
.fuse_hidden* | ||
.Trash-* | ||
.nfs* | ||
|
||
|
||
### Windows ### | ||
[Dd]esktop.ini | ||
$RECYCLE.BIN/ | ||
*.lnk | ||
|
||
|
||
### macOS ### | ||
.DS_Store | ||
._* | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
########################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import buildsrc.utils.excludeGeneratedGradleDsl | ||
import buildsrc.utils.initIdeProjectLogo | ||
|
||
plugins { | ||
buildsrc.conventions.base | ||
idea | ||
} | ||
|
||
group = "org.jetbrains.dokka.dokkatoo" | ||
version = "2.1.0-SNAPSHOT" | ||
|
||
|
||
idea { | ||
module { | ||
excludeGeneratedGradleDsl(layout) | ||
|
||
excludeDirs.apply { | ||
// exclude .gradle, IDE dirs from nested projects (e.g. example & template projects) | ||
// so IntelliJ project-wide search isn't cluttered with irrelevant files | ||
val excludedDirs = setOf( | ||
".idea", | ||
".gradle", | ||
"build", | ||
"gradle/wrapper", | ||
"ANDROID_SDK", | ||
) | ||
addAll( | ||
projectDir.walk().filter { file -> | ||
excludedDirs.any { | ||
file.invariantSeparatorsPath.endsWith(it) | ||
} | ||
} | ||
) | ||
} | ||
} | ||
} | ||
|
||
initIdeProjectLogo("modules/docs/images/logo-icon.svg") | ||
|
||
val dokkatooVersion by tasks.registering { | ||
description = "prints the Dokkatoo project version (used during release to verify the version)" | ||
group = "help" | ||
val version = providers.provider { project.version } | ||
doLast { | ||
logger.quiet("${version.orNull}") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import org.gradle.kotlin.dsl.support.expectedKotlinDslPluginsVersion | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
dependencies { | ||
implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion") | ||
implementation(libs.gradlePlugin.bcvMu) | ||
implementation(libs.gradlePlugin.dokkatoo) | ||
implementation(libs.gradlePlugin.gradlePublishPlugin) | ||
implementation("org.jetbrains.kotlin:kotlin-serialization:$embeddedKotlinVersion") | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(11)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
rootProject.name = "buildSrc" | ||
|
||
pluginManagement { | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
dependencyResolutionManagement { | ||
|
||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) | ||
|
||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
...a-runners/dokkatoo/buildSrc/src/main/kotlin/buildsrc/conventions/android-setup.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package buildsrc.conventions | ||
|
||
import org.jetbrains.kotlin.util.suffixIfNot | ||
|
||
|
||
/** | ||
* Utilities for preparing Android projects | ||
*/ | ||
|
||
plugins { | ||
base | ||
id("buildsrc.conventions.base") | ||
} | ||
|
||
|
||
val androidSdkDirPath: Provider<String> = providers | ||
// first try getting the SDK installed on via GitHub step setup-android | ||
.environmentVariable("ANDROID_SDK_ROOT").map(::File) | ||
// else get the project-local SDK | ||
.orElse(layout.projectDirectory.file("projects/ANDROID_SDK").asFile) | ||
.map { it.invariantSeparatorsPath } | ||
|
||
|
||
val createAndroidLocalPropertiesFile by tasks.registering { | ||
|
||
val localPropertiesFile = temporaryDir.resolve("local.properties") | ||
outputs.file(localPropertiesFile).withPropertyName("localPropertiesFile") | ||
|
||
val androidSdkDirPath = androidSdkDirPath | ||
inputs.property("androidSdkDirPath", androidSdkDirPath) | ||
|
||
doLast { | ||
localPropertiesFile.apply { | ||
parentFile.mkdirs() | ||
createNewFile() | ||
writeText( | ||
""" | ||
|# DO NOT EDIT - Generated by $path | ||
| | ||
|sdk.dir=${androidSdkDirPath.get()} | ||
| | ||
""".trimMargin() | ||
) | ||
} | ||
} | ||
} | ||
|
||
|
||
val updateAndroidLocalProperties by tasks.registering { | ||
|
||
// find all local.properties files | ||
val localPropertiesFiles = layout.projectDirectory.dir("projects") | ||
.asFileTree | ||
.matching { include("**/local.properties") } | ||
.files | ||
|
||
outputs.files(localPropertiesFiles).withPropertyName("localPropertiesFiles") | ||
|
||
val androidSdkDirPath = androidSdkDirPath | ||
inputs.property("androidSdkDirPath", androidSdkDirPath) | ||
|
||
doLast { | ||
localPropertiesFiles | ||
.filter { it.exists() } | ||
.forEach { file -> | ||
file.writeText( | ||
file.useLines { lines -> | ||
lines.joinToString("\n") { line -> | ||
when { | ||
line.startsWith("sdk.dir=") -> "sdk.dir=${androidSdkDirPath.get()}" | ||
else -> line | ||
} | ||
}.suffixIfNot("\n") | ||
} | ||
) | ||
} | ||
} | ||
} |
Oops, something went wrong.