Артефакт публикации не работает с Android Studio 3.4.1 - PullRequest
0 голосов
/ 19 мая 2019

после обновления Android Studio до 3.4.1 это заставляет мой gradle обновляться до 5.1.1, но каждый раз, когда я пытаюсь развернуть артефакт, он показывает нормально вот так:

02:45:06: Executing task ':uimodule_utils:artifactoryPublish'...

Executing tasks: [:uimodule_utils:artifactoryPublish]


> Configure project :app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Configure project :crashreport_utils
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Configure project :env_utils
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Configure project :gcmmodule2
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Configure project :netowrk_module
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Configure project :uimodule_utils
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Task :uimodule_utils:artifactoryPublish
> Task :artifactoryDeploy

BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed
02:45:07: Task execution finished ':uimodule_utils:artifactoryPublish'.

но в моей артефакте ничего не отображается, артефакт должен быть показан как 1.0.36

thumbnail

это мой корневой проект gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:3.1.0'
        classpath "io.realm:realm-gradle-plugin:3.1.4"
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.9.6"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.google.com/'
        }
        maven {
            url "https://jitpack.io"
        }
    }
    repositories {
        maven {  url 'https://dl.bintray.com/netguru/maven/' }
    }
    apply plugin: "com.jfrog.artifactory"
    apply plugin: 'maven-publish'
}

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

и мой app-gradle:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 26



    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dataBinding{
        enabled true
    }

}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    testImplementation 'junit:junit:4.12'
    implementation   'com.android.support:design:26.1.0'
    implementation 'com.github.ozodrukh:CircularReveal:2.0.1'
    implementation ('com.takisoft.fix:datetimepicker:1.0.6'){
        exclude group: 'com.android.support', module: 'appcompat-v7'

    }
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.10'
    compile 'com.google.dagger:dagger:2.10'

    // Dagger Android dependencies
    annotationProcessor 'com.google.dagger:dagger-android-processor:2.10'
    compile 'com.google.dagger:dagger-android-support:2.10'
    implementation project(':app')
}
def libraryGroupId = '<<mygroup>>'
def libraryArtifactId = '<<myid>>'
def libraryVersion = '1.0.36'

publishing {
    publications {
        aar(MavenPublication) {
            groupId libraryGroupId
            version libraryVersion
            artifactId libraryArtifactId

            artifact("$buildDir/outputs/aar/${artifactId}-erelease.aar")
        }
    }
}

artifactory {
    contextUrl = 'http://<<myserver>>:8081/artifactory'
    publish {
        repository {
            repoKey = 'develop-local-libs'

            username = artifactory_username
            password = artifactory_password
        }
        defaults {
            publications('aar')
            publishArtifacts = true

            properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
            publishPom = true
        }
    }
}

, пожалуйста, помогите, я даже не могу загрузить свою библиотеку на мой сервер, и она отлично работает в предыдущей студии Android

1 Ответ

0 голосов
/ 20 мая 2019

Вы уверены, что его нет в каталоге {apps dir}/outputs/aar/${artifactId}-erelease.aar. Имя файла должно <your_artifact_id>-erelease.aar внутри /aar каталога.

Можете ли вы показать мне код изменений на build.gradle, особенно на Publishing.publication part?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...