AAR / JAR not generated using Android Studio 3.0 Canary 7

So, the title pretty much sums up my problem. Does anyone know how to fix this? The last time I create apk, it works fine on AS 2.X, but now I am developing with Kotlin, so I have to use AS 3.0.

I am using AS 3.0 Canary 7 (this project is a new project)

This is my dummy class in my library (stored in "domain" .library.mylibrary)

class Test {
    fun hello(): String {
        return "hello"
    }
}

And this is my (mylibrary) gradle:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"


    defaultConfig {
        minSdkVersion 19
        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'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
    testImplementation 'junit:junit:4.12'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" //Declared in project level gradle: ext.kotlin_version = '1.1.3-2'
}

My gradlew.bat clean build --info log: https://pastebin.com/bfTZ5s4e

+4
source share
1 answer

Android Studio , AAR. jar output, apply plugin: 'maven-publish' mylibrary/gradle.build : 36. Maven ()

: ProGuard , ProGuard , .

, , assemble ( assembleRelease) - , aar .

:

./gradlew clean assembleRelease

/mylibrary/build/outputs/apk/release/, .

0

Source: https://habr.com/ru/post/1681931/


All Articles