Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Aug 29, 2024
1 parent b360888 commit 9f63b5e
Show file tree
Hide file tree
Showing 10 changed files with 202 additions and 19 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{kt, kts}]
ij_kotlin_imports_layout = *
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Android CI
name: build

on:
push:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: docs

on:
push:
branches:
- master

env:
JAVA_VERSION: 11
PYTHON_VERSION: 3.x
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

permissions:
contents: write
id-token: write
pages: write

jobs:
docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install MkDocs Material
run: pip install mkdocs-material

- name: Generate Docs
run: ./build_docs.sh

- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 版本日志

#### v1.2.0:2023-7-26
* 适配Android 11 (R) 软件包的可见性

#### v1.1.0:2023-3-26
* 迁移发布至 Maven Central

#### v1.0.0:2020-5-3
* MapHelper初始版本
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/MapHelper/master/app/release/app-release.apk)
[![MavenCentral](https://img.shields.io/maven-central/v/com.github.jenly1314/maphelper)](https://repo1.maven.org/maven2/com/github/jenly1314/maphelper/)
[![JCenter](https://img.shields.io/badge/JCenter-1.0.0-46C018.svg)](https://bintray.com/beta/#/jenly/maven/maphelper)
[![JitPack](https://jitpack.io/v/jenly1314/MapHelper.svg)](https://jitpack.io/#jenly1314/MapHelper)
[![CI](https://travis-ci.org/jenly1314/MapHelper.svg?branch=master)](https://travis-ci.org/jenly1314/MapHelper)
[![CircleCI](https://circleci.com/gh/jenly1314/MapHelper.svg?style=svg)](https://circleci.com/gh/jenly1314/MapHelper)
[![API](https://img.shields.io/badge/API-16%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=16)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)
Expand Down Expand Up @@ -64,18 +62,16 @@ MapHelper for Android 是一个整合了高德地图、百度地图、腾讯地
MapHelper.gcj02ToWGS84(latitude,longitude)
//...
```
更多使用详情,请查看[app](app)中的源码使用示例或直接查看 [API帮助文档](https://jitpack.io/com/github/jenly1314/MapHelper/latest/javadoc/)
更多使用详情,请查看[app](app)中的源码使用示例或直接查看 [API帮助文档](https://jenly1314.github.io/MapHelper/api/)

## 版本记录
<!-- end -->

## 版本日志

#### v1.2.0:2023-7-26
* 适配Android 11 (R) 软件包的可见性

#### v1.1.0:2023-3-26
* 迁移发布至 Maven Central

#### v1.0.0:2020-5-3
* MapHelper初始版本
#### [查看更多版本日志](CHANGELOG.md)

## 赞赏
如果您喜欢MapHelper,或感觉MapHelper帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley:
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
lintOptions {
abortOnError false
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
// id 'org.jetbrains.dokka' version '1.7.0' apply false
id 'org.jetbrains.dokka' version '1.9.20' apply false
id 'com.vanniktech.maven.publish' version '0.22.0' apply false
}
}
23 changes: 23 additions & 0 deletions build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -ex

# Generate the API docs
./gradlew dokkaHtml

mkdir -p docs/api
mv maphelper/build/dokka/html/* docs/api

# Copy in special files that GitHub wants in the project root.
GITHUB_URL=https://github.com/jenly1314/MapHelper/
echo $GITHUB_URL
sed "/<!-- end -->/q" README.md > docs/index.md
sed -i "s|app/src/main/ic_launcher-playstore.png|ic_logo.png|g" docs/index.md
sed -i "s|](app|](${GITHUB_URL}blob/master/app|g" docs/index.md
cat CHANGELOG.md | grep -v '## 版本日志' > docs/changelog.md

cp GIF.gif docs/GIF.gif
cp app/src/main/ic_launcher-playstore.png docs/ic_logo.png

# Build the site locally
mkdocs build
9 changes: 5 additions & 4 deletions maphelper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.dokka'
id 'com.vanniktech.maven.publish'
id 'kotlin-parcelize'
}
Expand All @@ -23,11 +24,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
lintOptions {
abortOnError false
Expand All @@ -42,4 +43,4 @@ dependencies {
androidTestImplementation "androidx.test.ext:junit:$versions.androidExtJunit"
androidTestImplementation "androidx.test.espresso:espresso-core:$versions.espressoCore"

}
}
86 changes: 86 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Project information
site_name: MapHelper
site_url: https://jenly1314.github.io/MapHelper/
site_description: "MapHelper for Android"
site_author: Jenly
remote_branch: gh-pages
edit_uri: ""

# Repository
repo_name: MapHelper
repo_url: https://github.com/jenly1314/MapHelper

# Copyright
copyright: 'Copyright &copy; 2016 - 2024 Jenly'

# Configuration
theme:
name: 'material'
favicon: https://jenly1314.github.io/favicon.png
logo: https://jenly1314.github.io/medias/logo.png
icon:
repo: fontawesome/brands/github
language: zh
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: teal
accent: blue
toggle:
icon: octicons/sun-24
name: "切换到深色模式"
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: teal
accent: blue
toggle:
icon: octicons/moon-24
name: "切换到浅色模式"
features:
- navigation.instant
- navigation.instant.progress
- navigation.tabs
- content.code.copy

extra:
social:
- icon: material/home-circle
link: https://jenly1314.github.io/
- icon: simple/github
link: https://github.com/jenly1314/
- icon: simple/gitee
link: https://gitee.com/jenly1314/
- icon: fontawesome/solid/paper-plane
link: mailto:[email protected]

markdown_extensions:
- smarty
- footnotes
- meta
- toc:
permalink: true
- attr_list
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tilde
- pymdownx.tabbed:
alternate_style: true
- tables

# Plugins
plugins:
- search

nav:
- '概览': index.md
- 'API文档': api/index.html
- '版本日志': changelog.md

0 comments on commit 9f63b5e

Please sign in to comment.