RESOLVED:::Nexus -> JAR files work fine but AAR not

android

#1

=========RESOLVED======
=========RESOLVED======
=========RESOLVED======

Hello.

Been looking at possible solutions for work to have a local private Repo and come across Nexus.
So far…awesome.

We have various devs, mainly Spring Boot (Java). I also do the Android stuff…which is where I have run in to an issue.

I have created a basic Android Project to test the Gadle maven plugin to see how it fared with nexus.

In the repo under maven release, I added a .jar library and also a .aar library. The .jar library is resolved and incorporated in to my project without problem.
On the other hand, the .aar in the same repo location is not “resolved” by gradle/maven.

Are there steps I should be taking before uploading the aar?

Here is my Gradle:

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'maven'

repositories {
maven {
    credentials{
        username "$mavenUser"
        password "$mavenPassword"
    }
    url "http://localhost:8081/repository/maven-releases/"

}
}
android {
compileSdkVersion 28
defaultConfig {
    applicationId "bleh.com.myapplication"
    minSdkVersion 24
    targetSdkVersion 28
    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'])
//Compile/Implement any aars in this dir...
implementation fileTree(dir : 'aars',include:['*.aar'] )

//A *.jar on the Local Nexus Repo
compile 'com.test.android:sayhello:0.1'
//The *.aar that "can not be resolved" but works fine when placed in app/aars
compile 'com.test.android:mylibrary:0.1'

implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}