forked from ImaginativeShohag/Why-Not-Image-Carousel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ImaginativeShohag#112 from ImaginativeShohag/dev
Update dependencies
- Loading branch information
Showing
88 changed files
with
1,441 additions
and
708 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Copyright 2021 Md. Mahmudul Hasan Shohag | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
# Turn Gradle daemon off due to https://github.com/Kotlin/dokka/issues/1405 | ||
org.gradle.daemon=false | ||
|
||
org.gradle.parallel=true | ||
org.gradle.jvmargs=-Xmx4608m -XX:MaxMetaspaceSize=2048m -XX:+HeapDumpOnOutOfMemoryError | ||
org.gradle.workers.max=2 | ||
|
||
kotlin.compiler.execution.strategy=in-process |
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 @@ | ||
name: Publish docs | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: [ "master", "dev" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy_docs: | ||
runs-on: ubuntu-latest | ||
env: | ||
TERM: dumb | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Copy CI gradle.properties | ||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- name: Setup java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install mkdocs-material=="9.*" | ||
|
||
- name: Generate docs | ||
run: ./generate_docs.sh | ||
|
||
- name: Build site | ||
run: mkdocs build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site |
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
File renamed without changes
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 |
---|---|---|
@@ -1,26 +1,71 @@ | ||
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask | ||
import org.jetbrains.dokka.gradle.DokkaTask | ||
|
||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
buildscript { | ||
ext.kotlin_version = '1.8.21' | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
ext.kotlin_version = '1.9.23' | ||
ext.dokka_version = '1.9.20' | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:7.4.2' | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
classpath("org.jetbrains.dokka:dokka-base:$dokka_version") | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
plugins { | ||
id 'com.android.application' version '8.4.0' apply false | ||
id 'com.android.library' version '8.4.0' apply false | ||
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false | ||
id 'com.google.devtools.ksp' version '1.9.23-1.0.20' apply false | ||
id 'com.diffplug.spotless' version '6.25.0' | ||
id "org.jetbrains.dokka" version "$dokka_version" | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'com.diffplug.spotless' | ||
|
||
spotless { | ||
kotlin { | ||
target '**/*.kt' | ||
targetExclude "${layout.buildDirectory}/**/*.kt" | ||
targetExclude 'bin/**/*.kt' | ||
|
||
ktlint() | ||
licenseHeaderFile rootProject.file('spotless/copyright.kt') | ||
} | ||
|
||
format('kts') { | ||
target '**/*.kts' | ||
targetExclude '**/build/**/*.kts' | ||
// Look for the first line that doesn't have a block comment (assumed to be the license) | ||
licenseHeaderFile rootProject.file('spotless/copyright.kts'), '(^(?![\\/ ]\\*).*$)' | ||
} | ||
|
||
format('xml') { | ||
target '**/*.xml' | ||
targetExclude '**/build/**/*.xml' | ||
// Look for the first XML tag that isn't a comment (<!--) or the xml declaration (<?xml) | ||
licenseHeaderFile rootProject.file('spotless/copyright.xml'), '(<[^!?])' | ||
} | ||
} | ||
} | ||
|
||
tasks.withType(DokkaMultiModuleTask).configureEach { | ||
moduleName = "Why Not! Image Carousel!" | ||
outputDirectory = rootProject.file('docs/api') | ||
failOnWarning = true | ||
|
||
pluginsMapConfiguration.set( | ||
[ | ||
"org.jetbrains.dokka.base.DokkaBase": """{ | ||
"footerMessage": "Copyright © 2021 Md. Mahmudul Hasan Shohag" | ||
}""" | ||
] | ||
) | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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,44 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2021 The Android Open Source Project | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Fail on any error | ||
set -ex | ||
|
||
DOCS_ROOT=docs-gen | ||
|
||
[ -d $DOCS_ROOT ] && rm -r $DOCS_ROOT | ||
mkdir $DOCS_ROOT | ||
|
||
# Clear out the old API docs | ||
[ -d docs/api ] && rm -r docs/api | ||
# Build the docs with dokka | ||
./gradlew dokkaHtmlMultiModule --stacktrace | ||
|
||
# Create a copy of our docs at our $DOCS_ROOT | ||
cp -a docs/* $DOCS_ROOT | ||
|
||
cp README.md $DOCS_ROOT/index.md | ||
cp CHANGELOG.md $DOCS_ROOT/changelog.md | ||
|
||
sed -i.bak 's/README.md//g' $DOCS_ROOT/index.md | ||
sed -i.bak 's/CHANGELOG.md/changelog/' $DOCS_ROOT/index.md | ||
sed -i.bak 's/docs\/images\//images\//g' $DOCS_ROOT/index.md | ||
|
||
# Convert docs/xxx.md links to just xxx/ | ||
sed -i.bak 's/docs\/\([a-zA-Z-]*\).md/\1/g' $DOCS_ROOT/index.md | ||
|
||
# Finally delete all of the backup files | ||
find . -name '*.bak' -delete |
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
Oops, something went wrong.