Update gradle and external dependencies (#429)

* Update gradle and external dependencies

- Switch away from deprecated compile directive
- Remove explicit buildToolsVersion, is defined by the gradle plugin now
- Fix build in SelectFolderActivity

Signed-off-by: Harsh Shandilya <harsh@prjkt.io>

* Upgrade gradle plugin and wrapper to latest alpha

Signed-off-by: Harsh Shandilya <harsh@prjkt.io>

* Don't use alpha gradle plugin

Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
This commit is contained in:
Harsh Shandilya
2018-10-11 21:09:45 +05:30
committed by حسين
parent 9c932f1a10
commit 8ff0039be4
4 changed files with 29 additions and 35 deletions

View File

@@ -5,7 +5,6 @@ apply plugin: 'eclipse'
android { android {
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig { defaultConfig {
applicationId "com.zeapo.pwdstore" applicationId "com.zeapo.pwdstore"
minSdkVersion 16 minSdkVersion 16
@@ -56,36 +55,33 @@ android {
} }
dependencies { dependencies {
compile 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:recyclerview-v7:27.1.0' implementation 'com.android.support:recyclerview-v7:27.1.1'
compile 'com.android.support:cardview-v7:27.1.0' implementation 'com.android.support:cardview-v7:27.1.1'
compile 'com.android.support:design:27.1.0' implementation 'com.android.support:design:27.1.1'
compile 'com.android.support:support-annotations:27.1.0' implementation 'com.android.support:support-annotations:27.1.1'
compile 'org.sufficientlysecure:openpgp-api:11.0' implementation 'org.sufficientlysecure:openpgp-api:11.0'
compile 'com.nononsenseapps:filepicker:2.4.2' implementation 'com.nononsenseapps:filepicker:2.4.2'
compile('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') { implementation('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient' exclude group: 'org.apache.httpcomponents', module: 'httpclient'
} }
compile 'com.jcraft:jsch:0.1.54' implementation 'com.jcraft:jsch:0.1.54'
compile group: 'commons-io', name: 'commons-io', version: '2.4' implementation 'commons-io:commons-io:2.5'
compile group: 'commons-codec', name: 'commons-codec', version: '1.11' implementation 'commons-codec:commons-codec:1.11'
compile 'com.jayway.android.robotium:robotium-solo:5.3.1' implementation 'com.jayway.android.robotium:robotium-solo:5.3.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compile 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support.constraint:constraint-layout:1.1.3'
// Testing-only dependencies // Testing-only dependencies
androidTestCompile 'junit:junit:4.12' androidTestImplementation 'junit:junit:4.12'
androidTestCompile 'org.mockito:mockito-core:2.8.47' androidTestImplementation 'org.mockito:mockito-core:2.18.0'
androidTestCompile 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestCompile 'com.android.support.test:rules:1.0.1' androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
} }
repositories { repositories {
mavenCentral() mavenCentral()
// temp. solution until we use use gradle 4.0
maven { url 'https://maven.google.com' }
} }

View File

@@ -11,7 +11,7 @@ import com.zeapo.pwdstore.utils.PasswordRepository
// TODO more work needed, this is just an extraction from PgpHandler // TODO more work needed, this is just an extraction from PgpHandler
class SelectFolderActivity : AppCompatActivity() { class SelectFolderActivity : AppCompatActivity() {
internal var passwordList: SelectFolderFragment? = null private lateinit var passwordList: SelectFolderFragment
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
@@ -26,7 +26,7 @@ class SelectFolderActivity : AppCompatActivity() {
val args = Bundle() val args = Bundle()
args.putString("Path", PasswordRepository.getRepositoryDirectory(applicationContext).absolutePath) args.putString("Path", PasswordRepository.getRepositoryDirectory(applicationContext).absolutePath)
passwordList?.arguments = args passwordList.arguments = args
supportActionBar?.show() supportActionBar?.show()
@@ -55,7 +55,7 @@ class SelectFolderActivity : AppCompatActivity() {
} }
private fun selectFolder() { private fun selectFolder() {
intent.putExtra("SELECTED_FOLDER_PATH", passwordList?.currentDir?.absolutePath) intent.putExtra("SELECTED_FOLDER_PATH", passwordList.currentDir?.absolutePath)
setResult(Activity.RESULT_OK, intent) setResult(Activity.RESULT_OK, intent)
finish() finish()
} }

View File

@@ -1,17 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.1.51' ext.kotlin_version = '1.2.71'
repositories { repositories {
google()
jcenter() jcenter()
mavenCentral() mavenCentral()
maven {
url "https://maven.google.com"
}
google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
@@ -21,6 +18,7 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google()
jcenter() jcenter()
mavenCentral() mavenCentral()
} }

View File

@@ -1,6 +1,6 @@
#Wed Mar 28 22:40:58 CEST 2018 #Tue Oct 02 13:51:59 IST 2018
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip