Coder Social home page Coder Social logo

Comments (5)

marianobntz-silohub avatar marianobntz-silohub commented on May 16, 2024
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.appdistribution'
apply plugin: 'com.google.firebase.crashlytics'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    defaultConfig {
        applicationId rootProject.ext.silohubAppId
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.silohubBuild
        versionName rootProject.ext.silohubVersion
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        aaptOptions {
             // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
             // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
            ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
        }
    }
    signingConfigs {
        debug {
            storeFile file("${project.gradle.gradleUserHomeDir.parent}/.android/debug.keystore")
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
        release {
            storeFile file("${rootProject.buildDir}/../../../../build/tmp/android_sign.keystore")
            storePassword 'SILOHUB'
            keyAlias 'androidreleasekey'
            keyPassword 'SILOHUB'
        }
    }
    buildTypes {
        debug {
            debuggable true
            minifyEnabled false
            signingConfig signingConfigs.debug
            applicationIdSuffix ".debug"
            isDefault true
        }
        release {
            debuggable true
            minifyEnabled false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            firebaseAppDistribution {
                artifactType "APK" // despues ver como cambiamos para prod
                appId "silohubFirebaseAppId"
                releaseNotesFile "${buildDir}/../../../tmp/release_notes.txt"
                groups "silohubFirebaseTesterGroups"
            }
        }
        prod {
            debuggable false
            minifyEnabled true
            matchingFallbacks = ['release']
        }
    }
    lintOptions {
        abortOnError true
        htmlReport true
        htmlOutput file("${buildDir}/reports/pepe/lint-results.html")
    }
}

repositories {
    flatDir{
        dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
    implementation project(':capacitor-android')
    testImplementation "junit:junit:$junitVersion"
    androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
    androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
    implementation project(':capacitor-cordova-android-plugins')
}

apply from: 'capacitor.build.gradle'

try {
    def servicesJSON = file('google-services.json')
    if (servicesJSON.text) {
        apply plugin: 'com.google.gms.google-services'
    }
} catch(Exception e) {
    logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}

from trapeze.

marianobntz-silohub avatar marianobntz-silohub commented on May 16, 2024

if I run the same cap-config with java 8 it shows this error:

Unable to apply changes Error: Unable to load or parse gradle file: ERR_SUBPROCESS_NON_ZERO_EXIT
at GradleFile.parse (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/project/dist/android/gradle-file.js:93:19)
at async GradleFile.insertProperties (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/project/dist/android/gradle-file.js:27:9)
at async execute (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/operations/android/gradle.js:15:13)
at async executeOperations (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/tasks/run.js:75:9)
at async runCommand (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/tasks/run.js:34:9)
at async /Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/index.js:52:13
at async Command. (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/util/cli.js:31:13)
Fatal error: Error running command
Error: Unable to load or parse gradle file: ERR_SUBPROCESS_NON_ZERO_EXIT
at GradleFile.parse (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/project/dist/android/gradle-file.js:93:19)
at async GradleFile.insertProperties (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/project/dist/android/gradle-file.js:27:9)
at async execute (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/operations/android/gradle.js:15:13)
at async executeOperations (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/tasks/run.js:75:9)
at async runCommand (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/tasks/run.js:34:9)
at async /Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/index.js:52:13
at async Command. (/Users/mariano/work/silohub/product-frontends/node_modules/@capacitor/configure/dist/util/cli.js:31:13)

This happens because capacitor-gradle-parse is compiled with java 11... disregard...

from trapeze.

marianobntz-silohub avatar marianobntz-silohub commented on May 16, 2024

tried with node 14 and node 16 and still the same behaviour

from trapeze.

mlynch avatar mlynch commented on May 16, 2024

Thanks will try it against your gradle file and open jdk

from trapeze.

mlynch avatar mlynch commented on May 16, 2024

I think I fixed this issue. There was some problem with the internal process library I was using and was able to reproduce on a different gradle file. I rewrote the process execution part and it fixed the issue. Can you try the most recent release under the next tag?

from trapeze.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.