From b4768b8dc91505dfec6e5c156b0e6a6106131990 Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Mon, 1 Nov 2021 13:21:55 +0530 Subject: [PATCH] Removed github workflows --- .github/workflows/android.yml | 49 ----- .../itsaky/androidide/models/ApkMetadata.java | 197 ++++++++++++++++++ build.gradle | 4 +- 3 files changed, 199 insertions(+), 51 deletions(-) delete mode 100644 .github/workflows/android.yml create mode 100644 app/src/main/java/com/itsaky/androidide/models/ApkMetadata.java diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml deleted file mode 100644 index 94bddeddc..000000000 --- a/.github/workflows/android.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: CI - -on: - push: - pull_request: - workflow_dispatch: - -jobs: - build: - name: Build apk - runs-on: ubuntu-latest - steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.5.0 - with: - access_token: ${{ github.token }} - - - name: Clone repo - uses: actions/checkout@v2 - - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Build APK - uses: eskatos/gradle-command-action@v1 - with: - arguments: :app:build - distributions-cache-enabled: true - dependencies-cache-enabled: true - configuration-cache-enabled: true - - - name: Upload debug APK - uses: actions/upload-artifact@v2 - if: ${{ !github.head_ref }} - with: - name: apk-debug - path: app/build/outputs/apk/debug - - - name: Upload release APK - uses: actions/upload-artifact@v2 - if: ${{ !github.head_ref }} - with: - name: apk-release - path: app/build/outputs/apk/release diff --git a/app/src/main/java/com/itsaky/androidide/models/ApkMetadata.java b/app/src/main/java/com/itsaky/androidide/models/ApkMetadata.java new file mode 100644 index 000000000..f272e8a70 --- /dev/null +++ b/app/src/main/java/com/itsaky/androidide/models/ApkMetadata.java @@ -0,0 +1,197 @@ +package com.itsaky.androidide.models; + +import java.util.List; +import com.google.gson.annotations.SerializedName; + +public class ApkMetadata { + + @SerializedName("version") + private int version; + + @SerializedName("artifactType") + private ArtifactType artifactType; + + @SerializedName("applicationId") + private String applicationId; + + @SerializedName("variantName") + private String variantName; + + @SerializedName("elements") + private List elements; + + @SerializedName("elementType") + private String elementType; + + public void setVersion(int version) { + this.version = version; + } + + public void setArtifactType(ArtifactType artifactType) { + this.artifactType = artifactType; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public void setVariantName(String variantName) { + this.variantName = variantName; + } + + public void setElements(List elements) { + this.elements = elements; + } + + public void setElementType(String elementType) { + this.elementType = elementType; + } + + public int getVersion() { + return version; + } + + public ArtifactType getArtifactType() { + return artifactType; + } + + public String getApplicationId() { + return applicationId; + } + + public String getVariantName() { + return variantName; + } + + public List getElements() { + return elements; + } + + public String getElementType() { + return elementType; + } + + public static class ArtifactType { + + @SerializedName("type") + private String type; + + @SerializedName("kind") + private String kind; + + public void setType(String type) { + this.type = type; + } + + public void setKind(String kind) { + this.kind = kind; + } + + public String getType() { + return type; + } + + public String getKind() { + return kind; + } + + @Override + public String toString() { + return "["+getClass().getCanonicalName()+"]" + + "\ntype=" + type + + ",\nkind=" + kind; + } + } + + public static class Element { + + @SerializedName("type") + private String type; + + @SerializedName("filters") + private List filters; + + @SerializedName("attributes") + private List attributes; + + @SerializedName("versionCode") + private int versionCode; + + @SerializedName("versionName") + private String versionName; + + @SerializedName("outputFile") + private String outputFile; + + public void setType(String type) { + this.type = type; + } + + public void setFilters(List filters) { + this.filters = filters; + } + + public void setAttributes(List attributes) { + this.attributes = attributes; + } + + public void setVersionCode(int versionCode) { + this.versionCode = versionCode; + } + + public void setVersionName(String versionName) { + this.versionName = versionName; + } + + public void setOutputFile(String outputFile) { + this.outputFile = outputFile; + } + + public String getType() { + return type; + } + + public List getFilters() { + return filters; + } + + public List getAttributes() { + return attributes; + } + + public int getVersionCode() { + return versionCode; + } + + public String getVersionName() { + return versionName; + } + + public String getOutputFile() { + return outputFile; + } + + @Override + public String toString() { + return "["+getClass().getCanonicalName()+"]" + + "\ntype=" + type + + ",\nfilters=" + filters + + ",\nattributes=" + attributes + + ",\nversionCode=" + versionCode + + ",\nversionName=" + versionName + + ",\noutputFile=" + outputFile; + } + } + + @Override + public String toString() { + return "["+getClass().getCanonicalName()+"]" + + "\nversion=" + version + + ",\nartifactType=" + artifactType + + ",\napplicationId=" + applicationId + + ",\nvariantName=" + variantName + + ",\nelements=" + elements + + ",\nelementType=" + elementType; + } + +} diff --git a/build.gradle b/build.gradle index f32e17fde..57cdaaca9 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,8 @@ buildscript { buildTools = "31.0.0" minSdk = 24 targetSdk = 28 - versionCode = 103211029 - versionName = "1.0.3-alpha" + versionCode = 1031211101 + versionName = "1.0.3.1-alpha" packageName = "com.itsaky.androidide" javaSourceVersion = JavaVersion.VERSION_1_8