Как перейти от реализации к компиляции в Android Studio - PullRequest
0 голосов
/ 22 сентября 2019

Мне также нужно обновить пару инструментов, но там написано, что все обновлено ... Попытка скомпилировать Mycroft AI Core, затем Mycroft AI Client APK ... Вот репозиторий git: Mycroft-Android-Core Изображение 1 Изображение 2

Вот мои файлы Gradle ... Все, что я нашел.Я не уверен, что еще можно сделать.

:: Файл Build.gradle ::

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.2.51"
    repositories {
        google()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
        classpath 'io.fabric.tools:gradle:1.+'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url 'https://maven.google.com' }
        google()
        jcenter()
    }

    ext.versionMajor = 1
    ext.versionMinor = 0
    ext.versionPatch = 1
    ext.versionClassifier = "SNAPSHOT"

    project.ext {
        versionCode = ext.versionMajor * 10000 + ext.versionMinor * 100 + ext.versionPatch
        versionName = getVersionName()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

String getVersionName() {
    String versionName = "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
    if (ext.versionClassifier != null && !ext.versionClassifier.isEmpty()) {
        versionName = versionName + "-" + ext.versionClassifier
    }
    return versionName;
}

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "$rootProject.supportVersion"
            }
        }
    }
}

ext {
    minSdkVersion = 19
    targetSdkVersion = 27
    compileSdkVersion = 27
    buildToolsVersion = "27.0.3"
    kotlinVersion = "1.2.51"
    supportVersion = "27.0.1"


::Build.Gradle (for **Mobile**)


    // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.2.51"
    repositories {
        google()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
        classpath 'io.fabric.tools:gradle:1.+'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url 'https://maven.google.com' }
        google()
        jcenter()
    }

    ext.versionMajor = 1
    ext.versionMinor = 0
    ext.versionPatch = 1
    ext.versionClassifier = "SNAPSHOT"

    project.ext {
        versionCode = ext.versionMajor * 10000 + ext.versionMinor * 100 + ext.versionPatch
        versionName = getVersionName()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

String getVersionName() {
    String versionName = "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
    if (ext.versionClassifier != null && !ext.versionClassifier.isEmpty()) {
        versionName = versionName + "-" + ext.versionClassifier
    }
    return versionName;
}

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "$rootProject.supportVersion"
            }
        }
    }
}

ext {
    minSdkVersion = 19
    targetSdkVersion = 27
compileSdkVersion = 27
buildToolsVersion = "27.0.3"
kotlinVersion = "1.2.51"
supportVersion = "27.0.1"

:: Build.gradle Мобильный

    /*

         *  Copyright (c) 2017. Mycroft AI, Inc.
         *
         *  This file is part of Mycroft-Android a client for Mycroft Core.
         *
         *  This program is free software: you can redistribute it and/or modify
         *  it under the terms of the GNU General Public License as published by
         *  the Free Software Foundation, either version 3 of the License, or
         *  (at your option) any later version.
         *
         *  This program is distributed in the hope that it will be useful,
         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
         *  GNU General Public License for more details.
         *
         *  You should have received a copy of the GNU General Public License
         *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
         *
         */
        apply plugin: 'com.android.application'
        apply plugin: 'io.fabric'
        apply plugin: 'kotlin-android'
        apply plugin: 'kotlin-android-extensions'

        android {

            compileSdkVersion rootProject.compileSdkVersion
            buildToolsVersion rootProject.buildToolsVersion
            defaultConfig {
                applicationId "mycroft.ai"
                minSdkVersion rootProject.minSdkVersion
                targetSdkVersion rootProject.targetSdkVersion
                versionCode project.ext.versionCode
                versionName project.ext.versionName
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            }
            buildTypes {
                release {
                    minifyEnabled false
                    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                }
            }

            dataBinding {
                enabled=true
            }
        }

        repositories {
            google()
            jcenter()
            maven { url 'https://maven.fabric.io/public' }
        }

        dependencies {
            implementation fileTree(include: ['*.jar'], dir: 'libs')
            implementation "com.android.support:appcompat-v7:$rootProject.supportVersion"
            implementation "com.android.support:design:$rootProject.supportVersion"

            implementation "com.android.support:support-v4:$rootProject.supportVersion"

            // layout deps
            implementation "com.android.support:cardview-v7:$rootProject.supportVersion"
            implementation "com.android.support:recyclerview-v7:$rootProject.supportVersion"

            implementation "com.android.support:palette-v7:$rootProject.supportVersion"

            // Unit test dependencies
            testImplementation 'org.mockito:mockito-core:1.10.19'
            testImplementation 'org.powermock:powermock-api-mockito:1.6.4'
            testImplementation 'org.powermock:powermock-module-junit4-rule-agent:1.6.4'
            testImplementation 'org.powermock:powermock-module-junit4-rule:1.6.4'
            testImplementation 'org.powermock:powermock-module-junit4:1.6.4'
            testImplementation 'junit:junit:4.12'
            // Instrumentation dependencies
            androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
            androidTestImplementation 'com.android.support.test:runner:0.5'
            androidTestImplementation "com.android.support:support-annotations:$rootProject.supportVersion"
            implementation('com.crashlytics.sdk.android:crashlytics:2.5.7@aar') {
                transitive = true
            }
            implementation 'com.google.android.gms:play-services-wearable:9.4.0'
            wearApp project(':wear')
            implementation project(':shared')
            //kotlin
            implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
            //rxjava,rxandroid
            implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
            implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'

            implementation 'org.java-websocket:Java-WebSocket:1.3.0'

            implementation "com.android.support:support-core-utils:$rootProject.supportVersion"
        }
::Build.gradle **Watch**::

/ * * Copyright (c) 2017. Mycroft AI, Inc. * * Этот файл является частью Mycroft-Android, клиентом для Mycroftядро.* * Эта программа является свободным программным обеспечением: вы можете распространять ее и / или изменять * в соответствии с условиями Стандартной общественной лицензии GNU, опубликованной * Free Software Foundation, либо версией 3 Лицензии, либо * (по вашему усмотрению)любая более поздняя версия.* * Эта программа распространяется в надежде, что она будет полезна, * но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ;даже без подразумеваемой гарантии * ТОВАРНОГО ВОЗМОЖНОСТИ или ПРИГОДНОСТИ ДЛЯ ОСОБЫХ ЦЕЛЕЙ.Смотрите * GNU General Public License для более подробной информации.* * Вы должны были получить копию Стандартной общественной лицензии GNU * вместе с этой программой.Если нет, см. http://www.gnu.org/licenses/. * * /

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {

    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion
    defaultConfig {
        applicationId 'mycroft.ai'
        minSdkVersion rootProject.minSdkVersion
        targetSdkVersion rootProject.targetSdkVersion
        versionCode project.ext.versionCode
        versionName project.ext.versionName
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    compileOnly 'com.google.android.wearable:wearable:2.4.0'
    implementation 'com.google.android.support:wearable:2.4.0'
    implementation 'com.google.android.gms:play-services-wearable:16.0.1'
    implementation project(':shared')
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
...