Skip to content

Instantly share code, notes, and snippets.

@alaershov
Created December 29, 2018 19:18
Show Gist options
  • Save alaershov/15d846af63f3891f3fa1e683ca4a019a to your computer and use it in GitHub Desktop.
Save alaershov/15d846af63f3891f3fa1e683ca4a019a to your computer and use it in GitHub Desktop.
Gradle api vs compile
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.alaershov.gradletest"
minSdkVersion 21
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 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
implementation project(":presentation")
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'java-library'
dependencies {
}
package com.alaershov.gradletest;
import com.alaershov.domain.Domain;
import org.junit.Test;
public class DomainUnitTest {
@Test
public void domain() {
new Domain();
}
}
apply plugin: 'java-library'
dependencies {
api project(":domain")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment