From 26d02ebb0d835eec3fdae364529b65d271abf836 Mon Sep 17 00:00:00 2001 From: cketti Date: Thu, 24 May 2018 02:46:10 +0200 Subject: [PATCH] Create :mail:protocols:pop3 Gradle module --- .../k9/controller/MessagingController.java | 1 - mail/k9mail/build.gradle | 1 + mail/protocols/pop3/build.gradle | 52 +++++++++++++++++++ .../pop3/src/main/AndroidManifest.xml | 2 + .../k9/mail/store/pop3/Pop3Capabilities.java | 0 .../fsck/k9/mail/store/pop3/Pop3Commands.java | 0 .../k9/mail/store/pop3/Pop3Connection.java | 0 .../k9/mail/store/pop3/Pop3ErrorResponse.java | 0 .../fsck/k9/mail/store/pop3/Pop3Folder.java | 0 .../fsck/k9/mail/store/pop3/Pop3Message.java | 0 .../store/pop3/Pop3ResponseInputStream.java | 0 .../fsck/k9/mail/store/pop3/Pop3Settings.java | 0 .../fsck/k9/mail/store/pop3/Pop3Store.java | 0 .../k9/mail/store/pop3/MockPop3Server.java | 0 .../mail/store/pop3/Pop3CapabilitiesTest.java | 0 .../mail/store/pop3/Pop3ConnectionTest.java | 0 .../k9/mail/store/pop3/Pop3FolderTest.java | 0 .../k9/mail/store/pop3/Pop3MessageTest.java | 0 .../k9/mail/store/pop3/Pop3StoreTest.java | 0 .../mail/store/pop3/SimplePop3Settings.java | 0 settings.gradle | 1 + 21 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 mail/protocols/pop3/build.gradle create mode 100644 mail/protocols/pop3/src/main/AndroidManifest.xml rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Capabilities.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Commands.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Connection.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ErrorResponse.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Folder.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Message.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ResponseInputStream.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Settings.java (100%) rename mail/{common => protocols/pop3}/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java (100%) rename mail/{common => protocols/pop3}/src/test/java/com/fsck/k9/mail/store/pop3/MockPop3Server.java (100%) rename mail/{common => protocols/pop3}/src/test/java/com/fsck/k9/mail/store/pop3/Pop3CapabilitiesTest.java (100%) rename mail/{common => protocols/pop3}/src/test/java/com/fsck/k9/mail/store/pop3/Pop3ConnectionTest.java (100%) rename mail/{common => protocols/pop3}/src/test/java/com/fsck/k9/mail/store/pop3/Pop3FolderTest.java (100%) rename mail/{common => protocols/pop3}/src/test/java/com/fsck/k9/mail/store/pop3/Pop3MessageTest.java (100%) rename mail/{common => protocols/pop3}/src/test/java/com/fsck/k9/mail/store/pop3/Pop3StoreTest.java (100%) rename mail/{common => protocols/pop3}/src/test/java/com/fsck/k9/mail/store/pop3/SimplePop3Settings.java (100%) diff --git a/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java b/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java index a7f21603a..7b5f664f2 100644 --- a/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java +++ b/k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java @@ -67,7 +67,6 @@ import com.fsck.k9.mail.FetchProfile; import com.fsck.k9.mail.FetchProfile.Item; import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.Folder; -import com.fsck.k9.mail.Folder.FolderType; import com.fsck.k9.mail.Message; import com.fsck.k9.mail.Message.RecipientType; import com.fsck.k9.mail.MessageRetrievalListener; diff --git a/mail/k9mail/build.gradle b/mail/k9mail/build.gradle index b81b0674b..86aa4a438 100644 --- a/mail/k9mail/build.gradle +++ b/mail/k9mail/build.gradle @@ -13,6 +13,7 @@ dependencies { api project(":mail:common") api project(":mail:protocols:imap") + api project(":mail:protocols:pop3") implementation "org.apache.james:apache-mime4j-core:0.8.1" implementation "org.apache.james:apache-mime4j-dom:0.8.1" diff --git a/mail/protocols/pop3/build.gradle b/mail/protocols/pop3/build.gradle new file mode 100644 index 000000000..80014505a --- /dev/null +++ b/mail/protocols/pop3/build.gradle @@ -0,0 +1,52 @@ +apply plugin: 'com.android.library' +apply plugin: 'org.jetbrains.kotlin.android' + +apply from: "${rootProject.projectDir}/gradle/plugins/checkstyle-android.gradle" +apply from: "${rootProject.projectDir}/gradle/plugins/findbugs-android.gradle" + +if (rootProject.testCoverage) { + apply plugin: 'jacoco' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}" + + api project(":mail:common") + + implementation "com.jakewharton.timber:timber:${versions.timber}" + implementation "com.android.support:support-annotations:${versions.supportLibrary}" + + testImplementation project(":mail:testing") + testImplementation "org.robolectric:robolectric:${versions.robolectric}" + testImplementation "junit:junit:${versions.junit}" + testImplementation "com.google.truth:truth:${versions.truth}" + testImplementation "org.mockito:mockito-core:${versions.mockito}" + testImplementation "com.squareup.okio:okio:${versions.okio}" + testImplementation "com.jcraft:jzlib:1.0.7" + testImplementation "commons-io:commons-io:${versions.commonsIo}" +} + +android { + compileSdkVersion buildConfig.compileSdk + buildToolsVersion buildConfig.buildTools + + defaultConfig { + minSdkVersion buildConfig.minSdk + } + + buildTypes { + debug { + testCoverageEnabled rootProject.testCoverage + } + } + + lintOptions { + abortOnError false + lintConfig file("$rootProject.projectDir/config/lint/lint.xml") + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } +} diff --git a/mail/protocols/pop3/src/main/AndroidManifest.xml b/mail/protocols/pop3/src/main/AndroidManifest.xml new file mode 100644 index 000000000..c33a07ad0 --- /dev/null +++ b/mail/protocols/pop3/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Capabilities.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Capabilities.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Capabilities.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Capabilities.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Commands.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Commands.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Commands.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Commands.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Connection.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Connection.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Connection.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Connection.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ErrorResponse.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ErrorResponse.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ErrorResponse.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ErrorResponse.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Folder.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Folder.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Folder.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Folder.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Message.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Message.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Message.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Message.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ResponseInputStream.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ResponseInputStream.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ResponseInputStream.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3ResponseInputStream.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Settings.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Settings.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Settings.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Settings.java diff --git a/mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java b/mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java similarity index 100% rename from mail/common/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java rename to mail/protocols/pop3/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java diff --git a/mail/common/src/test/java/com/fsck/k9/mail/store/pop3/MockPop3Server.java b/mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/MockPop3Server.java similarity index 100% rename from mail/common/src/test/java/com/fsck/k9/mail/store/pop3/MockPop3Server.java rename to mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/MockPop3Server.java diff --git a/mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3CapabilitiesTest.java b/mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3CapabilitiesTest.java similarity index 100% rename from mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3CapabilitiesTest.java rename to mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3CapabilitiesTest.java diff --git a/mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3ConnectionTest.java b/mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3ConnectionTest.java similarity index 100% rename from mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3ConnectionTest.java rename to mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3ConnectionTest.java diff --git a/mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3FolderTest.java b/mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3FolderTest.java similarity index 100% rename from mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3FolderTest.java rename to mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3FolderTest.java diff --git a/mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3MessageTest.java b/mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3MessageTest.java similarity index 100% rename from mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3MessageTest.java rename to mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3MessageTest.java diff --git a/mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3StoreTest.java b/mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3StoreTest.java similarity index 100% rename from mail/common/src/test/java/com/fsck/k9/mail/store/pop3/Pop3StoreTest.java rename to mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/Pop3StoreTest.java diff --git a/mail/common/src/test/java/com/fsck/k9/mail/store/pop3/SimplePop3Settings.java b/mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/SimplePop3Settings.java similarity index 100% rename from mail/common/src/test/java/com/fsck/k9/mail/store/pop3/SimplePop3Settings.java rename to mail/protocols/pop3/src/test/java/com/fsck/k9/mail/store/pop3/SimplePop3Settings.java diff --git a/settings.gradle b/settings.gradle index a91874889..3a38b2e8c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,5 +3,6 @@ include ':mail:common' include ':mail:k9mail' include ':mail:testing' include ':mail:protocols:imap' +include ':mail:protocols:pop3' include ':plugins:HoloColorPicker' include ':plugins:openpgp-api-lib:openpgp-api'