sti-ufrn / JApi

Apache License 2.0
1 stars 0 forks source link

Problema de importação #1

Open Samuellucas97 opened 4 years ago

Samuellucas97 commented 4 years ago

Oi, estou com problema na importação do gradle. Diante disso, o erro é o seguinte: Gradle DSL method not found: 'compile()'

victorlopesjg commented 4 years ago

Olá @Samuellucas97 . Lembre-se que a nova versão do gradle usa o implementation e não mais o compile

Samuellucas97 commented 4 years ago

Oi novamente (desculpe pelo incômodo),

Eu modifiquei e apareceu essa mensagem de erro: ERROR: Failed to resolve: br.ufrn.mobile.japi:app:1.0.0

Segue abaixo os arquivos build.gradle (Module:app)

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.example.testapi"
        minSdkVersion 15
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.core:core-ktx:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation(group: 'br.ufrn.mobile.japi', name: 'app', version: '1.0.0', ext: 'aar')
}

e build.gradle (Project:TestApi)

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

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
        maven { url "http://repo.info.ufrn.br/artifactory/libs-release-local" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
victorlopesjg commented 4 years ago

Entra em contato com api@info.ufrn.br