Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
name: Build
on: [pull_request, push]

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Build the app
run: ./gradlew driveappfolderviewer:assemble
- name: Checkout
uses: actions/checkout@v4

- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '17'
cache: gradle

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4

- name: Build
run: ./gradlew build
33 changes: 33 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Release

on:
push:
tags:
- '*'

env:
RELEASE_SIGNING_ENABLED: true

jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'Commit451/DriveAppFolderViewer'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '17'
cache: gradle

- name: Release to Maven Central
run: ./gradlew publishAndReleaseToMavenCentral -PVERSION_NAME="${GITHUB_REF_NAME}" --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
4 changes: 0 additions & 4 deletions .jitpack.yml

This file was deleted.

23 changes: 6 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,16 @@ Allows easy visualization of files within an AppFolder in Google Drive

<img src="/art/screenshot-1.png?raw=true" width="200px">

[![](https://jitpack.io/v/Commit451/DriveAppFolderViewer.svg)](https://jitpack.io/#Commit451/DriveAppFolderViewer)
[![Build](https://github.com/Commit451/DriveAppFolderViewer/actions/workflows/ci.yml/badge.svg)](https://github.com/Commit451/DriveAppFolderViewer/actions/workflows/ci.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.commit451.driveappfolderviewer/driveappfolderviewer.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.commit451.driveappfolderviewer/driveappfolderviewer)

## Dependency
Add this in your root `build.gradle` file (**not** your module `build.gradle` file):

```gradle
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```

Then, add the library to your project `build.gradle`
```gradle
```kotlin
dependencies {
debugImplementation 'com.github.Commit451:DriveAppFolderViewer:latest.version.here'
// or, just "implementation" if you want to use this in all your builds
debugImplementation("com.commit451.driveappfolderviewer:driveappfolderviewer:<latest-version>")
// or use implementation(...) if you want it in all builds
}
```

We recommend restricting access to this UI to just debug builds, since it is powerful and users could end up deleting important files without understanding what they do.

## Usage
Expand All @@ -39,7 +28,7 @@ Note: This library makes no attempt to resolve Google API connection issues, so
To contribute to this project and test it with the sample within this repo, you will need to generate your own OAuth 2.0 Client ID following the steps [here](https://developers.google.com/drive/android/get-started)

## Note
- This library is pretty hefty, bringing in Kotlin, Coroutines, okio, and [okyo](https://github.com/Commit451/okyo), as well as the Google Drive v3 Java APIs. Make sure you are aware of this.
- This library is pretty hefty, bringing in Kotlin, Coroutines, and the Google Drive v3 Java APIs. Make sure you are aware of this.
- There is a 1,000 page limit on results, therefore only the first 1,000 files/folders will be shown within a folder.

License
Expand Down
87 changes: 0 additions & 87 deletions app/build.gradle

This file was deleted.

81 changes: 81 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.plugin.compose")
}

android {
namespace = "com.commit451.driveappfolderviewer.sample"
compileSdk = 35

defaultConfig {
applicationId = "com.commit451.driveappfolderviewer.sample"
minSdk = 21
targetSdk = 35
versionCode = 1
versionName = "1.0"
}

buildFeatures {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.15"
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

buildTypes {
debug {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}

packaging {
resources {
excludes += setOf(
"META-INF/INDEX.LIST",
"META-INF/DEPENDENCIES",
"META-INF/LICENSE",
"META-INF/LICENSE.txt",
"META-INF/license.txt",
"META-INF/NOTICE",
"META-INF/NOTICE.txt",
"META-INF/notice.txt",
"META-INF/ASL2.0",
)
}
}

lint {
abortOnError = false
}
}

dependencies {
implementation("androidx.core:core-ktx:1.16.0")
implementation("androidx.activity:activity-compose:1.10.1")
implementation("androidx.compose.material:material:1.6.8")
implementation("androidx.compose.animation:animation:1.6.8")
implementation("androidx.compose.ui:ui-tooling:1.6.8")
implementation("androidx.compose.material:material-icons-extended:1.6.8")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.9.1")
implementation("androidx.compose.runtime:runtime-livedata:1.6.8")

implementation(project(":driveappfolderviewer"))
}
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.commit451.driveappfolderviewer.sample">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
29 changes: 0 additions & 29 deletions build.gradle

This file was deleted.

10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
id("com.android.application") version "9.1.0" apply false
id("com.android.library") version "9.1.0" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.3.10" apply false
id("com.vanniktech.maven.publish") version "0.30.0" apply false
}

tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
53 changes: 0 additions & 53 deletions driveappfolderviewer/build.gradle

This file was deleted.

Loading