Tôi đang sử dụng Android Studio 3.0 Preview để bắt đầu dự án Kotlin mới. Khi tôi cố gắng thêm phụ thuộc vào build.gradle
Tôi đã thấy phạm vi implementation
thay vì thông thường compile
."Triển khai" trong phụ thuộc của Kotlin Gradle là gì?
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:25.3.1'
testImplementation 'junit:junit:4.12'
Cũng có phạm vi androidTestImplementation
và testImplementation
.
Cuối cùng, tôi thêm compile
để thêm phụ thuộc bên thứ ba và nó hoạt động.
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
Vì vậy, câu hỏi của tôi là ..
implementation
,androidTestImplementation
, vàtestImplementation
phạm vi là gì?- Có khác biệt nào so với
compile
,testCompile
vàandroidTestCompile
? - Tôi nên sử dụng cái nào cho dự án Kotlin của mình?
Chỉnh sửa: Không đúng, câu hỏi này không phải là Kotlin cụ thể. Đó là số Android Gradle Plugin configuration mới.