-
Notifications
You must be signed in to change notification settings - Fork 860
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
Modify deploy_docs script to include Android #2258
Open
danielnugraha
wants to merge
44
commits into
main
Choose a base branch
from
add-deploy-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 30 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
e928970
Add android sdk
danielnugraha 212fb46
Add new grpc implementation to run in background
danielnugraha 19f7bda
Streaming unary call with delay
danielnugraha f61400a
Add release github actions and delete .idea folder
danielnugraha 6627892
Add release github actions and delete .idea folder
danielnugraha d97c0c9
Merge from main
danielnugraha 42a2785
Add documentation
danielnugraha 05d863c
Remove unnecessary files
danielnugraha af2a3c2
Remove unnecessary files
danielnugraha 0ac9557
Update android release github actions
danielnugraha 026e26e
Update .github/workflows/android-release.yml
tanertopal 282f69c
Update .github/workflows/android-release.yml
tanertopal 562d9cf
Update .github/workflows/android-release.yml
danielnugraha 543b38b
Add script for deploying docs
danielnugraha 68399b4
Add custom assets
danielnugraha 10286f2
Update src/kotlin/flwr/src/main/java/dev/flower/android/gRPC.kt
danielnugraha c8e366c
Update src/kotlin/flwr/src/main/java/dev/flower/android/gRPC.kt
danielnugraha cb0c60c
Update src/kotlin/flwr/src/main/java/dev/flower/android/gRPC.kt
danielnugraha f6430ac
Merge branch 'main' into add-android-sdk
danielnugraha d50b389
Move gitignore to root
danielnugraha a8d9938
Merge remote-tracking branch 'refs/remotes/origin/add-android-sdk' in…
danielnugraha 07cc57b
Merge branch 'main' into add-deploy-docs
danielnugraha 02a99a0
Merge remote-tracking branch 'origin/add-android-sdk' into add-deploy…
danielnugraha db723c7
Merge remote-tracking branch 'origin/add-deploy-docs' into add-deploy…
danielnugraha a79af26
Merge remote-tracking branch 'origin/main' into add-deploy-docs
danielnugraha 8d106fa
Move script to separate deploy-android-docs.sh
danielnugraha 97c99fe
Add github actions for android doc publication
danielnugraha 56bc29a
remove filter to deploy docs
danielnugraha 68cb17b
remove filter to deploy docs
danielnugraha 7fa4d9b
fix cd
danielnugraha 50dfd94
Update .github/workflows/android-release.yml
tanertopal d6a861a
Update .github/workflows/android-release.yml
tanertopal 7501c68
Update dev/deploy-android-docs.sh
danielnugraha f1d2dda
Merge branch 'main' into add-deploy-docs
tanertopal 7ad4d44
Merge branch 'main' into add-deploy-docs
tanertopal b2417bd
Merge branch 'main' into add-android-sdk
danieljanes 05ead53
Update src/kotlin/gradle.properties
danielnugraha 0c4b0a8
Update src/kotlin/flwr/src/main/java/dev/flower/android/gRPC.kt
danielnugraha 9dc80d0
Rename ReRe to Rere
danielnugraha 4d7a7f3
Merge remote-tracking branch 'origin/add-android-sdk' into add-deploy…
danielnugraha 2129fd6
Rename to android.yml
danielnugraha 354628c
Change to flwr
danielnugraha 27355cb
Merge branch 'main' into add-deploy-docs
danielnugraha faf892d
Update .github/workflows/android.yml
tanertopal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ | ||
name: Android Client Publish | ||
|
||
on: | ||
pull_request | ||
|
||
jobs: | ||
deploy_docs: | ||
runs-on: ubuntu-latest | ||
name: Deploy Android docs | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
- name: Build and deploy docs | ||
env: | ||
AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }} | ||
run: ./dev/deploy-android-docs.sh | ||
|
||
tanertopal marked this conversation as resolved.
Show resolved
Hide resolved
|
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,28 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2020 Adap GmbH. All Rights Reserved. | ||
# | ||
# 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. | ||
# ============================================================================== | ||
|
||
set -e | ||
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ | ||
|
||
ROOT=`pwd` | ||
|
||
# Build and deploy Flower Android docs | ||
cd $ROOT | ||
cd src/kotlin | ||
./gradlew dokkaHtml | ||
cd flwr/build/dokka/html | ||
aws s3 sync --delete --exclude ".*" --exclude "v/*" --acl public-read --cache-control "no-cache" ./ s3://flower.dev/docs/android | ||
danielnugraha marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
// Not 8.0.2 because on macOS `Could not find protoc-3.11.0-osx-aarch_64.exe (com.google.protobuf:protoc:3.11.0)` | ||
classpath("com.android.tools.build:gradle:7.4.2") | ||
// Not 0.9.2 because of https:/grpc/grpc-kotlin/issues/380 | ||
classpath("com.google.protobuf:protobuf-gradle-plugin:0.9.1") | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0") | ||
|
||
classpath("com.vanniktech:gradle-maven-publish-plugin:0.25.3") // NEW | ||
|
||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
} |
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,107 @@ | ||
import org.jetbrains.dokka.gradle.DokkaTask | ||
import org.jetbrains.dokka.base.DokkaBase | ||
import org.jetbrains.dokka.base.DokkaBaseConfiguration | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
id("com.google.protobuf") | ||
id("maven-publish") | ||
id("com.vanniktech.maven.publish") | ||
id("org.jetbrains.dokka") version "1.8.20" | ||
} | ||
|
||
buildscript { | ||
dependencies { | ||
classpath("org.jetbrains.dokka:dokka-base:1.8.20") | ||
} | ||
} | ||
|
||
android { | ||
namespace = "dev.flower" | ||
compileSdk = 33 | ||
|
||
defaultConfig { | ||
aarMetadata { | ||
minCompileSdk = 28 | ||
} | ||
minSdk = 28 | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.1" | ||
} | ||
packagingOptions { | ||
resources { | ||
excludes.add("/META-INF/{AL2.0,LGPL2.1}") | ||
} | ||
} | ||
} | ||
|
||
val grpcVersion = "1.56.1" | ||
|
||
protobuf { | ||
protoc { | ||
artifact = "com.google.protobuf:protoc:3.23.4" | ||
} | ||
plugins { | ||
create("grpc") { | ||
artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion" | ||
} | ||
} | ||
generateProtoTasks { | ||
all().forEach { task -> | ||
task.builtins { | ||
create("java") { | ||
option("lite") | ||
} | ||
} | ||
task.plugins { | ||
create("grpc") { | ||
option("lite") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.dokkaHtml { | ||
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> { | ||
customStyleSheets = listOf(file("res/style.css")) | ||
customAssets = listOf(file("res/logo-icon.svg")) | ||
footerMessage = "(c) 2023 Flower Labs GmbH" | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.core:core-ktx:1.10.1") | ||
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0")) | ||
implementation("io.grpc:grpc-okhttp:$grpcVersion") | ||
implementation("io.grpc:grpc-protobuf-lite:$grpcVersion") | ||
implementation("io.grpc:grpc-stub:$grpcVersion") | ||
implementation("javax.annotation:javax.annotation-api:1.3.2") | ||
|
||
protobuf(files("../../proto")) | ||
dokkaPlugin("org.jetbrains.dokka:android-documentation-plugin:1.8.20") | ||
|
||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
} |
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle.kts. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we always wants to deploy the docs on pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. We don't. I adjusted the suggestion.