From b4d2665aa6ef5792328be32083f6ee56e06a51fd Mon Sep 17 00:00:00 2001 From: Balazs Toth Date: Fri, 24 Mar 2023 17:02:52 +0100 Subject: [PATCH 1/7] small things I found while reading through the code --- .../AnswerFormat.kt | 22 ++++++++++--------- .../backend/helpers/extensions/Context.kt | 21 ++++++------------ .../backend/navigator/TaskNavigator.kt | 10 +++------ .../backend/presenter/PresenterImpl.kt | 2 -- .../question_parts/DateTimePickerPart.kt | 1 + .../question_parts/MultipleChoicePart.kt | 1 - .../backend/views/question_parts/ScalePart.kt | 1 - .../views/question_parts/SingleChoicePart.kt | 3 +-- .../views/question_parts/TimePickerPart.kt | 2 ++ ...ckable+createSelectableThemedBackground.kt | 2 +- .../imageSelector/ImageSelectorPart.kt | 2 +- .../views/questions/BooleanQuestionView.kt | 5 +++-- .../views/questions/FinishQuestionView.kt | 3 +-- .../questions/LocationPickerQuestionView.kt | 3 ++- .../questions/MultipleChoiceQuestionView.kt | 8 ++----- .../views/questions/ScaleQuestionView.kt | 14 ++++-------- .../questions/SingleChoiceQuestionView.kt | 4 ++-- .../views/questions/TextQuestionView.kt | 10 ++++----- .../views/questions/TimePickerQuestionView.kt | 2 +- .../backend/views/step/QuestionView.kt | 5 +++-- .../backend/views/step/ViewActions.kt | 3 +-- .../test/NavigableOrderedTaskNavigatorTest.kt | 18 +++++++-------- .../test/OrderedTaskNavigatorTest.kt | 18 +++++++-------- .../test/TaskNavigatorTest.kt | 14 ++++++------ 24 files changed, 76 insertions(+), 98 deletions(-) diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/AnswerFormat.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/AnswerFormat.kt index b3d3a53..e19524e 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/AnswerFormat.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/AnswerFormat.kt @@ -78,8 +78,8 @@ sealed class AnswerFormat { check(defaultValue == null || choices.contains(defaultValue)) { throw IllegalStateException( "${ValuePickerAnswerFormat::class.simpleName}:" + - "${ValuePickerAnswerFormat::defaultValue.name}($defaultValue) " + - "has to be part of " + ValuePickerAnswerFormat::choices.name + "($choices)" + "${ValuePickerAnswerFormat::defaultValue.name}($defaultValue) " + + "has to be part of " + ValuePickerAnswerFormat::choices.name + "($choices)" ) } } @@ -151,15 +151,17 @@ sealed class AnswerFormat { } companion object { - operator fun invoke(): DateTimeAnswerFormat = DateTimeAnswerFormat( - defaultValue = DateTime( - day = Calendar.getInstance().get(Calendar.DAY_OF_MONTH), - month = Calendar.getInstance().get(Calendar.MONTH), - year = Calendar.getInstance().get(Calendar.YEAR), - hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY), - minute = Calendar.getInstance().get(Calendar.MINUTE) + operator fun invoke(): DateTimeAnswerFormat = with(Calendar.getInstance()) { + DateTimeAnswerFormat( + defaultValue = DateTime( + day = get(Calendar.DAY_OF_MONTH), + month = get(Calendar.MONTH), + year = get(Calendar.YEAR), + hour = get(Calendar.HOUR_OF_DAY), + minute = get(Calendar.MINUTE) + ) ) - ) + } } } diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Context.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Context.kt index 4e91eb8..2c147d4 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Context.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Context.kt @@ -1,18 +1,11 @@ package com.quickbirdstudios.surveykit.backend.helpers.extensions -import android.Manifest +import android.Manifest.permission.ACCESS_COARSE_LOCATION +import android.Manifest.permission.ACCESS_FINE_LOCATION import android.content.Context -import android.content.pm.PackageManager -import androidx.core.app.ActivityCompat +import android.content.pm.PackageManager.PERMISSION_GRANTED +import androidx.core.app.ActivityCompat.checkSelfPermission -fun Context.isLocationPermissionGranted(): Boolean { - return ( - ActivityCompat.checkSelfPermission( - this, - Manifest.permission.ACCESS_FINE_LOCATION - ) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission( - this, - Manifest.permission.ACCESS_COARSE_LOCATION - ) == PackageManager.PERMISSION_GRANTED - ) -} +fun Context.isLocationPermissionGranted(): Boolean = + checkSelfPermission(this, ACCESS_FINE_LOCATION) == PERMISSION_GRANTED && + checkSelfPermission(this, ACCESS_COARSE_LOCATION) == PERMISSION_GRANTED diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/TaskNavigator.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/TaskNavigator.kt index c9ae681..c116b4d 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/TaskNavigator.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/TaskNavigator.kt @@ -34,7 +34,7 @@ interface TaskNavigator { return history.peek() } - fun hasPreviousStep() : Boolean { + fun hasPreviousStep(): Boolean { val previousStep = peekHistory() return previousStep != null } @@ -48,12 +48,8 @@ interface TaskNavigator { companion object { operator fun invoke(task: Task): TaskNavigator = when (task) { - is OrderedTask -> OrderedTaskNavigator( - task - ) - is NavigableOrderedTask -> NavigableOrderedTaskNavigator( - task - ) + is OrderedTask -> OrderedTaskNavigator(task) + is NavigableOrderedTask -> NavigableOrderedTaskNavigator(task) else -> throw NotImplementedError() } } diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/PresenterImpl.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/PresenterImpl.kt index 97a277c..25e77bd 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/PresenterImpl.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/PresenterImpl.kt @@ -7,11 +7,9 @@ import com.quickbirdstudios.surveykit.StepIdentifier import com.quickbirdstudios.surveykit.SurveyTheme import com.quickbirdstudios.surveykit.backend.navigator.TaskNavigator import com.quickbirdstudios.surveykit.backend.presenter.animations.ViewAnimator -import com.quickbirdstudios.surveykit.backend.views.step.QuestionView import com.quickbirdstudios.surveykit.backend.views.step.StepView import com.quickbirdstudios.surveykit.result.StepResult import com.quickbirdstudios.surveykit.steps.Step -import kotlinx.android.synthetic.main.layout_header.view.* import kotlinx.android.synthetic.main.view_question.view.* import java.util.Date import kotlin.coroutines.resume diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DateTimePickerPart.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DateTimePickerPart.kt index d89b166..6bbb718 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DateTimePickerPart.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DateTimePickerPart.kt @@ -51,6 +51,7 @@ internal class DateTimePickerPart @JvmOverloads constructor( gravity = Gravity.CENTER orientation = VERTICAL + // TODO: Make is24HourView configurable? timePicker = TimePickerDialog(context, this, selectedTime.hour, selectedTime.minute, true) datePicker = DatePickerDialog( diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/MultipleChoicePart.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/MultipleChoicePart.kt index 7ffc003..7d65407 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/MultipleChoicePart.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/MultipleChoicePart.kt @@ -1,7 +1,6 @@ package com.quickbirdstudios.surveykit.backend.views.question_parts import android.content.Context -import android.graphics.Color import android.os.Handler import android.util.AttributeSet import android.view.Gravity diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ScalePart.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ScalePart.kt index 29fc727..688a1fb 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ScalePart.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ScalePart.kt @@ -51,7 +51,6 @@ internal class ScalePart @JvmOverloads constructor( private var minimumValue: Int = 0 private var maximumValue: Int = 10 private var step = 1f - private var defaultValue = 0f private var minimumValueDescriptionField: TextView private var maximumValueDescriptionField: TextView diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/SingleChoicePart.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/SingleChoicePart.kt index 89894ed..390832e 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/SingleChoicePart.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/SingleChoicePart.kt @@ -1,7 +1,6 @@ package com.quickbirdstudios.surveykit.backend.views.question_parts import android.content.Context -import android.graphics.Color import android.util.AttributeSet import android.view.Gravity import android.view.View @@ -137,7 +136,7 @@ internal class SingleChoicePart @JvmOverloads constructor( return RadioButton(context).apply { id = View.generateViewId() - setText(label) + text = label this.tag = tag isFocusable = true isClickable = true diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TimePickerPart.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TimePickerPart.kt index bf3dcf8..25deff4 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TimePickerPart.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TimePickerPart.kt @@ -11,6 +11,8 @@ import com.quickbirdstudios.surveykit.R import com.quickbirdstudios.surveykit.SurveyTheme import com.quickbirdstudios.surveykit.backend.views.main_parts.StyleablePart +// TODO: Make 24/12 representation configurable + use system settings as default +// Check deprecation @Suppress("DEPRECATION") internal class TimePickerPart @JvmOverloads constructor( context: Context, diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt index 04bc88f..fd74c34 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt @@ -117,7 +117,7 @@ private class BackgroundCreationHelper { //endregion - //region SubClasses# + //region SubClasses private enum class IconDrawable { Default, Check; diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt index fcba2b9..235b8ed 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt @@ -80,7 +80,7 @@ internal class ImageSelectorPart @JvmOverloads constructor( //region Subtypes - internal class ImageWrapper(val image: ImageChoice, var selected: Boolean) + internal data class ImageWrapper(val image: ImageChoice, var selected: Boolean) //endregion diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/BooleanQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/BooleanQuestionView.kt index 5695ff6..71c984b 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/BooleanQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/BooleanQuestionView.kt @@ -30,10 +30,11 @@ internal class BooleanQuestionView( //region Overrides override fun createResults(): QuestionResult { - val stringIdentifier: String = (answerFormat.textChoices + val stringIdentifier: String = answerFormat + .textChoices .find { it.text == booleanAnswerPart.selected?.text } ?.value - ?: "") + ?: "" return BooleanQuestionResult( id = id, diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/FinishQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/FinishQuestionView.kt index 51d97d5..95ab497 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/FinishQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/FinishQuestionView.kt @@ -20,8 +20,7 @@ internal class FinishQuestionView( //region Overrides - override fun createResults() = - FinishQuestionResult(id, startDate) + override fun createResults() = FinishQuestionResult(id, startDate) override fun isValidInput() = true diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/LocationPickerQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/LocationPickerQuestionView.kt index b3c54bf..44e075c 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/LocationPickerQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/LocationPickerQuestionView.kt @@ -11,7 +11,7 @@ import com.quickbirdstudios.surveykit.backend.views.step.QuestionView import com.quickbirdstudios.surveykit.result.QuestionResult import com.quickbirdstudios.surveykit.result.question_results.LocationQuestionResult -@SuppressLint("ViewConstructor") +@SuppressLint("ViewConstructor") // TODO: Add also for other views internal class LocationPickerQuestionView( context: Context, id: StepIdentifier, @@ -22,6 +22,7 @@ internal class LocationPickerQuestionView( skipButtonText: String, private val lifecycle: Lifecycle?, private val addressProvider: AddressSuggestionProvider?, + // TODO: Why unused? private val answerFormat: AnswerFormat.LocationAnswerFormat, private val preselected: AnswerFormat.LocationAnswerFormat.Location? ) : QuestionView(context, id, isOptional, title, text, nextButtonText, skipButtonText) { diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/MultipleChoiceQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/MultipleChoiceQuestionView.kt index 730bac9..646ecab 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/MultipleChoiceQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/MultipleChoiceQuestionView.kt @@ -34,9 +34,7 @@ internal class MultipleChoiceQuestionView( id = id, startDate = startDate, answer = choicesContainer.selected, - stringIdentifier = choicesContainer.selected - .map { it.value } - .joinToString(",") + stringIdentifier = choicesContainer.selected.joinToString(",") { it.value } ) override fun isValidInput(): Boolean = isOptional || choicesContainer.isOneSelected() @@ -48,9 +46,7 @@ internal class MultipleChoiceQuestionView( choicesContainer.options = answerFormat.textChoices choicesContainer.onCheckedChangeListener = { _, _ -> footer.canContinue = isValidInput() } val preselectedOptions = preselected ?: emptyList() - val selectedOptions = - if (preselectedOptions.isNotEmpty()) preselectedOptions - else answerFormat.defaultSelections + val selectedOptions = preselectedOptions.ifEmpty { answerFormat.defaultSelections } choicesContainer.selected = selectedOptions } diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ScaleQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ScaleQuestionView.kt index ec34b75..3585abb 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ScaleQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ScaleQuestionView.kt @@ -48,16 +48,10 @@ internal class ScaleQuestionView( val minimumValueDescription = answerFormat.minimumValueDescription val maximumValueDescription = answerFormat.maximumValueDescription - val minValueDescription = - if (minimumValueDescription.isNotBlank()) - minimumValueDescription - else - answerFormat.minimumValue.toString() - val maxValueDescription = - if (maximumValueDescription.isNotBlank()) - maximumValueDescription - else - answerFormat.maximumValue.toString() + val minValueDescription = minimumValueDescription + .ifBlank { answerFormat.minimumValue.toString() } + val maxValueDescription = maximumValueDescription + .ifBlank { answerFormat.maximumValue.toString() } scalePart = content.add( ScalePart( diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/SingleChoiceQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/SingleChoiceQuestionView.kt index 7bdb0cd..08bc2a2 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/SingleChoiceQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/SingleChoiceQuestionView.kt @@ -30,10 +30,10 @@ internal class SingleChoiceQuestionView( //region Overrides override fun createResults(): QuestionResult { - val stringIdentifier = (answerFormat.textChoices + val stringIdentifier = answerFormat.textChoices .find { it.text == choicesContainer.selected?.text } ?.value - ?: "") + ?: "" return SingleChoiceQuestionResult( id = id, diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TextQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TextQuestionView.kt index 083777f..cc3083e 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TextQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TextQuestionView.kt @@ -38,12 +38,10 @@ internal class TextQuestionView( stringIdentifier = questionAnswerView.field.text.toString() ) - override fun isValidInput(): Boolean { - answerFormat.isValid?.let { isValidCheck -> - if (!isValidCheck(questionAnswerView.field.text.toString())) return false - } - return questionAnswerView.field.getNonNullText().isNotBlank() - } + override fun isValidInput(): Boolean = + if (answerFormat.isValid(questionAnswerView.field.text.toString())) + questionAnswerView.field.getNonNullText().isNotBlank() + else false override fun setupViews() { super.setupViews() diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TimePickerQuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TimePickerQuestionView.kt index 1aeb9e2..6d8f66c 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TimePickerQuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TimePickerQuestionView.kt @@ -47,7 +47,7 @@ internal class TimePickerQuestionView( //endregion - //region Priavte API + //region Private API private fun AnswerFormat.TimeAnswerFormat.Time.toSelected(): TimePickerPart.Selected = TimePickerPart.Selected(hour = this.hour, minute = this.minute) diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/QuestionView.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/QuestionView.kt index 63aae5c..b46252e 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/QuestionView.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/QuestionView.kt @@ -73,7 +73,8 @@ abstract class QuestionView( abortDialogConfiguration?.message ?: R.string.abort_dialog_message, abortDialogConfiguration?.neutralMessage ?: R.string.abort_dialog_neutral_message, - abortDialogConfiguration?.negativeMessage ?: R.string.abort_dialog_neutral_message + abortDialogConfiguration?.negativeMessage + ?: R.string.abort_dialog_neutral_message ) ) { onCloseListener(createResults(), FinishReason.Discarded) @@ -92,5 +93,5 @@ abstract class QuestionView( footer.setSkipButtonText(skipButtonText) } -//endregion + //endregion } diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/ViewActions.kt b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/ViewActions.kt index ea551e9..e94178e 100644 --- a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/ViewActions.kt +++ b/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/ViewActions.kt @@ -3,8 +3,7 @@ package com.quickbirdstudios.surveykit.backend.views.step import com.quickbirdstudios.surveykit.FinishReason import com.quickbirdstudios.surveykit.result.QuestionResult -interface ViewActions : Skipable, - Identifiable { +interface ViewActions : Skipable, Identifiable { fun onNext(block: (QuestionResult) -> Unit) fun onBack(block: (QuestionResult) -> Unit) fun onClose(block: (QuestionResult, FinishReason) -> Unit) diff --git a/survey/src/test/java/com/quickbirdstudios/test/NavigableOrderedTaskNavigatorTest.kt b/survey/src/test/java/com/quickbirdstudios/test/NavigableOrderedTaskNavigatorTest.kt index 1a8f1eb..82a85fc 100644 --- a/survey/src/test/java/com/quickbirdstudios/test/NavigableOrderedTaskNavigatorTest.kt +++ b/survey/src/test/java/com/quickbirdstudios/test/NavigableOrderedTaskNavigatorTest.kt @@ -12,10 +12,10 @@ internal class NavigableOrderedTaskNavigatorTest { @Test fun testStraightWalkThrough() { - val firstQuestion = randomQuestionStep() - val secondQuestion = randomQuestionStep() - val thirdQuestion = randomQuestionStep() - val forthQuestion = randomQuestionStep() + val firstQuestion = mockQuestionStep() + val secondQuestion = mockQuestionStep() + val thirdQuestion = mockQuestionStep() + val forthQuestion = mockQuestionStep() val navigableOrderedTask = NavigableOrderedTask( listOf(firstQuestion, secondQuestion, thirdQuestion, forthQuestion) ) @@ -39,10 +39,10 @@ internal class NavigableOrderedTaskNavigatorTest { @Test fun testDifferentWalkingPath() { - val firstQuestion = randomQuestionStep() - val secondQuestion = randomQuestionStep() - val thirdQuestion = randomQuestionStep() - val forthQuestion = randomQuestionStep() + val firstQuestion = mockQuestionStep() + val secondQuestion = mockQuestionStep() + val thirdQuestion = mockQuestionStep() + val forthQuestion = mockQuestionStep() val navigableOrderedTask = NavigableOrderedTask( listOf(firstQuestion, secondQuestion, thirdQuestion, forthQuestion) ) @@ -64,7 +64,7 @@ internal class NavigableOrderedTaskNavigatorTest { Assert.assertEquals(thirdQuestion, navigator.nextStep(secondQuestion)) } - private fun randomQuestionStep() = QuestionStep( + private fun mockQuestionStep() = QuestionStep( title = "title", text = "text", answerFormat = AnswerFormat.TextAnswerFormat(maxLines = 1) diff --git a/survey/src/test/java/com/quickbirdstudios/test/OrderedTaskNavigatorTest.kt b/survey/src/test/java/com/quickbirdstudios/test/OrderedTaskNavigatorTest.kt index c55f164..3ef94e8 100644 --- a/survey/src/test/java/com/quickbirdstudios/test/OrderedTaskNavigatorTest.kt +++ b/survey/src/test/java/com/quickbirdstudios/test/OrderedTaskNavigatorTest.kt @@ -11,9 +11,9 @@ internal class OrderedTaskNavigatorTest { @Test fun testStraightWalkThrough() { - val firstQuestion = randomQuestionStep() - val secondQuestion = randomQuestionStep() - val thirdQuestion = randomQuestionStep() + val firstQuestion = mockQuestionStep() + val secondQuestion = mockQuestionStep() + val thirdQuestion = mockQuestionStep() val orderedTask = OrderedTask(listOf(firstQuestion, secondQuestion, thirdQuestion)) val navigator = TaskNavigator(orderedTask) @@ -25,9 +25,9 @@ internal class OrderedTaskNavigatorTest { @Test fun testBackwards() { - val firstQuestion = randomQuestionStep() - val secondQuestion = randomQuestionStep() - val thirdQuestion = randomQuestionStep() + val firstQuestion = mockQuestionStep() + val secondQuestion = mockQuestionStep() + val thirdQuestion = mockQuestionStep() val orderedTask = OrderedTask(listOf(firstQuestion, secondQuestion, thirdQuestion)) val navigator = TaskNavigator(orderedTask) @@ -38,14 +38,14 @@ internal class OrderedTaskNavigatorTest { @Test fun testFinalStep() { - val finalStep = randomQuestionStep() - val orderedTask = OrderedTask((0..100).map { randomQuestionStep() } + finalStep) + val finalStep = mockQuestionStep() + val orderedTask = OrderedTask((0..100).map { mockQuestionStep() } + finalStep) val navigator = TaskNavigator(orderedTask) Assert.assertEquals(finalStep, navigator.finalStep()) } - private fun randomQuestionStep() = QuestionStep( + private fun mockQuestionStep() = QuestionStep( title = "title", text = "text", answerFormat = AnswerFormat.TextAnswerFormat(maxLines = 1) diff --git a/survey/src/test/java/com/quickbirdstudios/test/TaskNavigatorTest.kt b/survey/src/test/java/com/quickbirdstudios/test/TaskNavigatorTest.kt index 34804d2..6332b92 100644 --- a/survey/src/test/java/com/quickbirdstudios/test/TaskNavigatorTest.kt +++ b/survey/src/test/java/com/quickbirdstudios/test/TaskNavigatorTest.kt @@ -13,9 +13,9 @@ import org.junit.Test class TaskNavigatorTest { @Test fun testHasNoPreviousStep() { - val firstQuestion = randomQuestionStep() - val secondQuestion = randomQuestionStep() - val thirdQuestion = randomQuestionStep() + val firstQuestion = mockQuestionStep() + val secondQuestion = mockQuestionStep() + val thirdQuestion = mockQuestionStep() val taskNavigator = createTaskImplementations(listOf(firstQuestion, secondQuestion, thirdQuestion)) for (nav in taskNavigator) { @@ -26,9 +26,9 @@ class TaskNavigatorTest { @Test fun testHasPreviousStep() { - val firstQuestion = randomQuestionStep() - val secondQuestion = randomQuestionStep() - val thirdQuestion = randomQuestionStep() + val firstQuestion = mockQuestionStep() + val secondQuestion = mockQuestionStep() + val thirdQuestion = mockQuestionStep() val taskNavigator = createTaskImplementations(listOf(firstQuestion, secondQuestion, thirdQuestion)) for (nav in taskNavigator) { @@ -51,7 +51,7 @@ class TaskNavigatorTest { ) } - private fun randomQuestionStep() = QuestionStep( + private fun mockQuestionStep() = QuestionStep( title = "title", text = "text", answerFormat = AnswerFormat.TextAnswerFormat(maxLines = 1) From d887e3463ac7321a79f7d878c77310015a1de105 Mon Sep 17 00:00:00 2001 From: Orhun Kupeli Date: Thu, 1 Jun 2023 13:54:31 +0200 Subject: [PATCH 2/7] Fix broken package name --- .../quickbirdstudios/surveykit}/AnswerFormat.kt | 0 .../quickbirdstudios/surveykit}/FinishReason.kt | 0 .../quickbirdstudios/surveykit}/Identifier.kt | 0 .../quickbirdstudios/surveykit}/NavigationRule.kt | 0 .../quickbirdstudios/surveykit}/SurveyTheme.kt | 0 .../quickbirdstudios/surveykit}/Task.kt | 0 .../surveykit}/backend/helpers/extensions/Context.kt | 0 .../surveykit}/backend/helpers/extensions/Dimensions.kt | 0 .../surveykit}/backend/helpers/extensions/Drawable.kt | 0 .../backend/helpers/extensions/EditText+afterTextChanged.kt | 0 .../surveykit}/backend/helpers/extensions/View.kt | 0 .../quickbirdstudios/surveykit}/backend/helpers/logTag.kt | 0 .../surveykit}/backend/navigator/NavigableOrderedTaskNavigator.kt | 0 .../surveykit}/backend/navigator/OrderedTaskNavigator.kt | 0 .../surveykit}/backend/navigator/TaskNavigator.kt | 0 .../quickbirdstudios/surveykit}/backend/presenter/NextAction.kt | 0 .../quickbirdstudios/surveykit}/backend/presenter/Presenter.kt | 0 .../surveykit}/backend/presenter/PresenterImpl.kt | 0 .../surveykit}/backend/presenter/animations/ViewAnimator.kt | 0 .../surveykit}/backend/result_gatherer/ResultGatherer.kt | 0 .../surveykit}/backend/result_gatherer/ResultGathererImpl.kt | 0 .../backend/views/main_parts/AbortDialogConfiguration.kt | 0 .../surveykit}/backend/views/main_parts/Content.kt | 0 .../surveykit}/backend/views/main_parts/DialogConfiguration.kt | 0 .../surveykit}/backend/views/main_parts/Dialogs.kt | 0 .../surveykit}/backend/views/main_parts/Footer.kt | 0 .../surveykit}/backend/views/main_parts/Header.kt | 0 .../surveykit}/backend/views/main_parts/StyleablePart.kt | 0 .../surveykit}/backend/views/question_parts/DatePickerPart.kt | 0 .../surveykit}/backend/views/question_parts/DateTimePickerPart.kt | 0 .../surveykit}/backend/views/question_parts/InfoTextPart.kt | 0 .../backend/views/question_parts/IntegerTextFieldPart.kt | 0 .../surveykit}/backend/views/question_parts/LocationPickerPart.kt | 0 .../surveykit}/backend/views/question_parts/MultipleChoicePart.kt | 0 .../surveykit}/backend/views/question_parts/QuestionAnimation.kt | 0 .../surveykit}/backend/views/question_parts/ScalePart.kt | 0 .../surveykit}/backend/views/question_parts/SingleChoicePart.kt | 0 .../surveykit}/backend/views/question_parts/TextFieldPart.kt | 0 .../surveykit}/backend/views/question_parts/TimePickerPart.kt | 0 .../surveykit}/backend/views/question_parts/ValuePickerPart.kt | 0 .../helper/Checkable+createSelectableThemedBackground.kt | 0 .../views/question_parts/imageSelector/ImageSelectorAdapter.kt | 0 .../views/question_parts/imageSelector/ImageSelectorPart.kt | 0 .../surveykit}/backend/views/questions/BooleanQuestionView.kt | 0 .../surveykit}/backend/views/questions/DatePickerQuestionView.kt | 0 .../backend/views/questions/DateTimePickerQuestionView.kt | 0 .../surveykit}/backend/views/questions/EmailQuestionView.kt | 0 .../surveykit}/backend/views/questions/FinishQuestionView.kt | 0 .../backend/views/questions/ImageSelectorQuestionView.kt | 0 .../surveykit}/backend/views/questions/IntegerQuestionView.kt | 0 .../surveykit}/backend/views/questions/IntroQuestionView.kt | 0 .../backend/views/questions/LocationPickerQuestionView.kt | 0 .../backend/views/questions/MultipleChoiceQuestionView.kt | 0 .../surveykit}/backend/views/questions/ScaleQuestionView.kt | 0 .../backend/views/questions/SingleChoiceQuestionView.kt | 0 .../surveykit}/backend/views/questions/TextQuestionView.kt | 0 .../surveykit}/backend/views/questions/TimePickerQuestionView.kt | 0 .../surveykit}/backend/views/questions/ValuePickerQuestionView.kt | 0 .../surveykit}/backend/views/step/Identifiable.kt | 0 .../surveykit}/backend/views/step/QuestionView.kt | 0 .../quickbirdstudios/surveykit}/backend/views/step/Skipable.kt | 0 .../quickbirdstudios/surveykit}/backend/views/step/StepView.kt | 0 .../quickbirdstudios/surveykit}/backend/views/step/ViewActions.kt | 0 .../quickbirdstudios/surveykit}/result/QuestionResult.kt | 0 .../quickbirdstudios/surveykit}/result/Result.kt | 0 .../quickbirdstudios/surveykit}/result/StepResult.kt | 0 .../quickbirdstudios/surveykit}/result/TaskResult.kt | 0 .../surveykit}/result/question_results/BooleanQuestionResult.kt | 0 .../surveykit}/result/question_results/DateQuestionResult.kt | 0 .../surveykit}/result/question_results/DateTimeQuestionResult.kt | 0 .../surveykit}/result/question_results/EmailQuestionResult.kt | 0 .../surveykit}/result/question_results/FinishQuestionResult.kt | 0 .../surveykit}/result/question_results/ImageSelectorResult.kt | 0 .../surveykit}/result/question_results/IntegerQuestionResult.kt | 0 .../surveykit}/result/question_results/IntroQuestionResult.kt | 0 .../surveykit}/result/question_results/LocationQuestionResult.kt | 0 .../result/question_results/MultipleChoiceQuestionResult.kt | 0 .../surveykit}/result/question_results/ScaleQuestionResult.kt | 0 .../result/question_results/SingleChoiceQuestionResult.kt | 0 .../surveykit}/result/question_results/TextQuestionResult.kt | 0 .../surveykit}/result/question_results/TimeQuestionResult.kt | 0 .../result/question_results/ValuePickerQuestionResult.kt | 0 .../quickbirdstudios/surveykit}/steps/CompletionStep.kt | 0 .../quickbirdstudios/surveykit}/steps/InstructionStep.kt | 0 .../quickbirdstudios/surveykit}/steps/QuestionStep.kt | 0 .../quickbirdstudios/surveykit}/steps/Step.kt | 0 .../quickbirdstudios/surveykit}/survey/Survey.kt | 0 .../quickbirdstudios/surveykit}/survey/SurveyView.kt | 0 88 files changed, 0 insertions(+), 0 deletions(-) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/AnswerFormat.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/FinishReason.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/Identifier.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/NavigationRule.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/SurveyTheme.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/Task.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/helpers/extensions/Context.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/helpers/extensions/Dimensions.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/helpers/extensions/Drawable.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/helpers/extensions/EditText+afterTextChanged.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/helpers/extensions/View.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/helpers/logTag.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/navigator/NavigableOrderedTaskNavigator.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/navigator/OrderedTaskNavigator.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/navigator/TaskNavigator.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/presenter/NextAction.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/presenter/Presenter.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/presenter/PresenterImpl.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/presenter/animations/ViewAnimator.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/result_gatherer/ResultGatherer.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/result_gatherer/ResultGathererImpl.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/main_parts/AbortDialogConfiguration.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/main_parts/Content.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/main_parts/DialogConfiguration.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/main_parts/Dialogs.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/main_parts/Footer.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/main_parts/Header.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/main_parts/StyleablePart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/DatePickerPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/DateTimePickerPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/InfoTextPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/IntegerTextFieldPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/LocationPickerPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/MultipleChoicePart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/QuestionAnimation.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/ScalePart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/SingleChoicePart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/TextFieldPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/TimePickerPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/ValuePickerPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/imageSelector/ImageSelectorAdapter.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/question_parts/imageSelector/ImageSelectorPart.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/BooleanQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/DatePickerQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/DateTimePickerQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/EmailQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/FinishQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/ImageSelectorQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/IntegerQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/IntroQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/LocationPickerQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/MultipleChoiceQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/ScaleQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/SingleChoiceQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/TextQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/TimePickerQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/questions/ValuePickerQuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/step/Identifiable.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/step/QuestionView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/step/Skipable.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/step/StepView.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/backend/views/step/ViewActions.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/QuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/Result.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/StepResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/TaskResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/BooleanQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/DateQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/DateTimeQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/EmailQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/FinishQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/ImageSelectorResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/IntegerQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/IntroQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/LocationQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/MultipleChoiceQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/ScaleQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/SingleChoiceQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/TextQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/TimeQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/result/question_results/ValuePickerQuestionResult.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/steps/CompletionStep.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/steps/InstructionStep.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/steps/QuestionStep.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/steps/Step.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/survey/Survey.kt (100%) rename survey/src/main/java/{com.quickbirdstudios.surveykit => com/quickbirdstudios/surveykit}/survey/SurveyView.kt (100%) diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/AnswerFormat.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/AnswerFormat.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/AnswerFormat.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/AnswerFormat.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/FinishReason.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/FinishReason.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/FinishReason.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/FinishReason.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/Identifier.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/Identifier.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/Identifier.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/Identifier.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/NavigationRule.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/NavigationRule.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/NavigationRule.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/NavigationRule.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/SurveyTheme.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/SurveyTheme.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/SurveyTheme.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/SurveyTheme.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/Task.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/Task.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/Task.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/Task.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Context.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/Context.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Context.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/Context.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Dimensions.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/Dimensions.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Dimensions.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/Dimensions.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Drawable.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/Drawable.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/Drawable.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/Drawable.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/EditText+afterTextChanged.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/EditText+afterTextChanged.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/EditText+afterTextChanged.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/EditText+afterTextChanged.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/View.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/View.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/extensions/View.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/extensions/View.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/logTag.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/logTag.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/helpers/logTag.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/helpers/logTag.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/NavigableOrderedTaskNavigator.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/navigator/NavigableOrderedTaskNavigator.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/NavigableOrderedTaskNavigator.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/navigator/NavigableOrderedTaskNavigator.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/OrderedTaskNavigator.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/navigator/OrderedTaskNavigator.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/OrderedTaskNavigator.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/navigator/OrderedTaskNavigator.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/TaskNavigator.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/navigator/TaskNavigator.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/navigator/TaskNavigator.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/navigator/TaskNavigator.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/NextAction.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/NextAction.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/NextAction.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/NextAction.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/Presenter.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/Presenter.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/Presenter.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/Presenter.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/PresenterImpl.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/PresenterImpl.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/PresenterImpl.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/PresenterImpl.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/animations/ViewAnimator.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/animations/ViewAnimator.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/presenter/animations/ViewAnimator.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/animations/ViewAnimator.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/result_gatherer/ResultGatherer.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/result_gatherer/ResultGatherer.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/result_gatherer/ResultGatherer.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/result_gatherer/ResultGatherer.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/result_gatherer/ResultGathererImpl.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/result_gatherer/ResultGathererImpl.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/result_gatherer/ResultGathererImpl.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/result_gatherer/ResultGathererImpl.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/AbortDialogConfiguration.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/AbortDialogConfiguration.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/AbortDialogConfiguration.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/AbortDialogConfiguration.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Content.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Content.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Content.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Content.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/DialogConfiguration.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/DialogConfiguration.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/DialogConfiguration.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/DialogConfiguration.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Dialogs.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Dialogs.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Dialogs.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Dialogs.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Footer.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Footer.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Footer.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Footer.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Header.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Header.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/Header.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Header.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/StyleablePart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/StyleablePart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/main_parts/StyleablePart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/StyleablePart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DatePickerPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/DatePickerPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DatePickerPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/DatePickerPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DateTimePickerPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/DateTimePickerPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/DateTimePickerPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/DateTimePickerPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/InfoTextPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/InfoTextPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/InfoTextPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/InfoTextPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/IntegerTextFieldPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/IntegerTextFieldPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/IntegerTextFieldPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/IntegerTextFieldPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/LocationPickerPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/LocationPickerPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/LocationPickerPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/LocationPickerPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/MultipleChoicePart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/MultipleChoicePart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/MultipleChoicePart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/MultipleChoicePart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/QuestionAnimation.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/QuestionAnimation.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/QuestionAnimation.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/QuestionAnimation.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ScalePart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/ScalePart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ScalePart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/ScalePart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/SingleChoicePart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/SingleChoicePart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/SingleChoicePart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/SingleChoicePart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TextFieldPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/TextFieldPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TextFieldPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/TextFieldPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TimePickerPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/TimePickerPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/TimePickerPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/TimePickerPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ValuePickerPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/ValuePickerPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/ValuePickerPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/ValuePickerPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/helper/Checkable+createSelectableThemedBackground.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorAdapter.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/imageSelector/ImageSelectorAdapter.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorAdapter.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/imageSelector/ImageSelectorAdapter.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/question_parts/imageSelector/ImageSelectorPart.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/BooleanQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/BooleanQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/BooleanQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/BooleanQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/DatePickerQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/DatePickerQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/DatePickerQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/DatePickerQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/DateTimePickerQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/DateTimePickerQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/DateTimePickerQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/DateTimePickerQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/EmailQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/EmailQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/EmailQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/EmailQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/FinishQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/FinishQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/FinishQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/FinishQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ImageSelectorQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/ImageSelectorQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ImageSelectorQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/ImageSelectorQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/IntegerQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/IntegerQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/IntegerQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/IntegerQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/IntroQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/IntroQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/IntroQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/IntroQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/LocationPickerQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/LocationPickerQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/LocationPickerQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/LocationPickerQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/MultipleChoiceQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/MultipleChoiceQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/MultipleChoiceQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/MultipleChoiceQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ScaleQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/ScaleQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ScaleQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/ScaleQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/SingleChoiceQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/SingleChoiceQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/SingleChoiceQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/SingleChoiceQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TextQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/TextQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TextQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/TextQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TimePickerQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/TimePickerQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/TimePickerQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/TimePickerQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ValuePickerQuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/ValuePickerQuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/questions/ValuePickerQuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/questions/ValuePickerQuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/Identifiable.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/Identifiable.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/Identifiable.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/Identifiable.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/QuestionView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/QuestionView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/QuestionView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/QuestionView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/Skipable.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/Skipable.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/Skipable.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/Skipable.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/StepView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/StepView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/StepView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/StepView.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/ViewActions.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/ViewActions.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/backend/views/step/ViewActions.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/step/ViewActions.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/QuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/QuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/QuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/QuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/Result.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/Result.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/Result.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/Result.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/StepResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/StepResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/StepResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/StepResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/TaskResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/TaskResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/TaskResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/TaskResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/BooleanQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/BooleanQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/BooleanQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/BooleanQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/DateQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/DateQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/DateQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/DateQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/DateTimeQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/DateTimeQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/DateTimeQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/DateTimeQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/EmailQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/EmailQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/EmailQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/EmailQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/FinishQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/FinishQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/FinishQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/FinishQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/ImageSelectorResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/ImageSelectorResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/ImageSelectorResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/ImageSelectorResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/IntegerQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/IntegerQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/IntegerQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/IntegerQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/IntroQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/IntroQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/IntroQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/IntroQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/LocationQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/LocationQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/LocationQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/LocationQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/MultipleChoiceQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/MultipleChoiceQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/MultipleChoiceQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/MultipleChoiceQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/ScaleQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/ScaleQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/ScaleQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/ScaleQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/SingleChoiceQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/SingleChoiceQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/SingleChoiceQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/SingleChoiceQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/TextQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/TextQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/TextQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/TextQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/TimeQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/TimeQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/TimeQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/TimeQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/ValuePickerQuestionResult.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/ValuePickerQuestionResult.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/result/question_results/ValuePickerQuestionResult.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/result/question_results/ValuePickerQuestionResult.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/steps/CompletionStep.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/steps/CompletionStep.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/steps/CompletionStep.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/steps/CompletionStep.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/steps/InstructionStep.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/steps/InstructionStep.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/steps/InstructionStep.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/steps/InstructionStep.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/steps/QuestionStep.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/steps/QuestionStep.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/steps/QuestionStep.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/steps/QuestionStep.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/steps/Step.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/steps/Step.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/steps/Step.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/steps/Step.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/survey/Survey.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/survey/Survey.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/survey/Survey.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/survey/Survey.kt diff --git a/survey/src/main/java/com.quickbirdstudios.surveykit/survey/SurveyView.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/survey/SurveyView.kt similarity index 100% rename from survey/src/main/java/com.quickbirdstudios.surveykit/survey/SurveyView.kt rename to survey/src/main/java/com/quickbirdstudios/surveykit/survey/SurveyView.kt From f04aead6c15fd2bbacdfd81f7c98353beae4f917 Mon Sep 17 00:00:00 2001 From: Orhun Kupeli Date: Thu, 1 Jun 2023 15:28:03 +0200 Subject: [PATCH 3/7] Update gradle and related dependencies --- build.gradle.kts | 6 +++--- buildSrc/build.gradle.kts | 5 +---- buildSrc/src/main/kotlin/Deps.kt | 17 +++++++++-------- buildSrc/src/main/kotlin/Project.kt | 6 +++--- example/build.gradle.kts | 12 +++++++++--- gradle/wrapper/gradle-wrapper.properties | 4 ++-- settings.gradle | 4 +++- survey/build.gradle.kts | 7 ++++--- test/build.gradle.kts | 15 +++++++++++---- 9 files changed, 45 insertions(+), 31 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 483fc23..eb04112 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,9 +2,9 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile buildscript { repositories { - mavenCentral() - google() maven { url = uri("https://repository.quickbirdstudios.com/repository/public") } + google() + mavenCentral() } dependencies { @@ -14,8 +14,8 @@ buildscript { allprojects { repositories { - mavenCentral() google() + mavenCentral() } tasks.withType(KotlinJvmCompile::class.java).all { diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 48ffffe..a48a82a 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,16 +1,13 @@ - - plugins { `kotlin-dsl` } repositories { - mavenCentral() google() + mavenCentral() } dependencies { implementation(gradleApi()) implementation(localGroovy()) - implementation("com.android.tools.build:gradle:4.0.2") } diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index ef40bf6..0c8cd1d 100644 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -1,7 +1,8 @@ object Versions { - const val kotlin = "1.3.50" - const val coroutines = "1.3.0" + const val kotlin = "1.6.2" + const val kotlinPlugin = "1.6.20" + const val coroutines = "1.6.2" const val test = "1.1.1" const val jUnit = "5.5.2" const val jUnitPlatform = "1.5.2" @@ -9,10 +10,10 @@ object Versions { const val espresso = "3.1.0" object AndroidSupport { - const val appCompat = "1.0.0" - const val constraintLayout = "1.1.3" + const val appCompat = "1.3.0" + const val constraintLayout = "2.0.4" const val annotation = "1.0.0" - const val recyclerView = "1.0.0" + const val recyclerView = "1.2.1" } object PlayServices { @@ -20,19 +21,19 @@ object Versions { } object Google { - const val material = "1.2.1" + const val material = "1.4.0" } } object Deps { object Plugins { - const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}" + const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlinPlugin}" } object Kotlin { const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}" - const val reflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlin}" + const val reflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlinPlugin}" const val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutines}" const val androidCoroutines = diff --git a/buildSrc/src/main/kotlin/Project.kt b/buildSrc/src/main/kotlin/Project.kt index 0795a99..84372e9 100644 --- a/buildSrc/src/main/kotlin/Project.kt +++ b/buildSrc/src/main/kotlin/Project.kt @@ -1,8 +1,8 @@ object Project { object Android { - const val compileSdkVersion = 28 - const val targetSdkVersion = 28 - const val minSdkVersion = 21 + const val compileSdkVersion = "android-32" + const val targetSdkVersion = "32" + const val minSdkVersion = "21" const val testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } } diff --git a/example/build.gradle.kts b/example/build.gradle.kts index 9efb6a9..e9c37ad 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -10,20 +10,26 @@ plugins { androidExtensions { isExperimental = true } android { - compileSdkVersion(Project.Android.compileSdkVersion) + compileSdkVersion = Project.Android.compileSdkVersion defaultConfig { versionName = Library.version versionCode = 1 - minSdkVersion(Project.Android.minSdkVersion) + minSdkPreview = Project.Android.minSdkVersion targetSdkVersion(Project.Android.targetSdkVersion) testInstrumentationRunner = Project.Android.testInstrumentationRunner resValue("string", "google_api_key", googleMapsKey()) resValue("string", "yandex_api_key", yandexMapsKey()) } packagingOptions { - exclude("META-INF/*kotlin*") + jniLibs { + excludes += setOf("META-INF/*kotlin*") + } + resources { + excludes += setOf("META-INF/*kotlin*") + } } + namespace = "com.quickbirdstudios.example" } dependencies { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 865bf0b..488e2e4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Apr 01 15:38:24 CEST 2019 +#Thu Jun 01 14:36:42 CEST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/settings.gradle b/settings.gradle index bfe4a35..edd91c0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,12 +1,14 @@ buildscript { repositories { - mavenCentral() google() + mavenCentral() maven { url 'https://repository.quickbirdstudios.com/repository/public' } } dependencies { classpath("com.quickbirdstudios:gradle-publishing:0.1.0") + classpath("com.android.tools.build:gradle:7.4.2") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20") } } diff --git a/survey/build.gradle.kts b/survey/build.gradle.kts index 792f677..4c6cd4a 100644 --- a/survey/build.gradle.kts +++ b/survey/build.gradle.kts @@ -10,18 +10,19 @@ plugins { androidExtensions { isExperimental = true } android { - compileSdkVersion(Project.Android.compileSdkVersion) + compileSdkVersion = Project.Android.compileSdkVersion defaultConfig { version = Library.version - minSdkVersion(Project.Android.minSdkVersion) - targetSdkVersion(Project.Android.targetSdkVersion) + minSdkPreview = Project.Android.minSdkVersion + targetSdkPreview = Project.Android.targetSdkVersion testInstrumentationRunner = Project.Android.testInstrumentationRunner } testOptions { animationsDisabled = true } + namespace = "com.quickbirdstudios.surveykit" } dependencies { diff --git a/test/build.gradle.kts b/test/build.gradle.kts index 50a8745..66e79bc 100644 --- a/test/build.gradle.kts +++ b/test/build.gradle.kts @@ -1,5 +1,4 @@ import com.quickbirdstudios.surveykit.ApiKeys.googleMapsKey -import com.quickbirdstudios.surveykit.ApiKeys.yandexMapsKey plugins { id("com.android.application") @@ -21,9 +20,16 @@ android { resValue("string", "google_api_key", googleMapsKey()) } packagingOptions { - exclude("META-INF/*kotlin*") - exclude("META-INF/LICENSE.md") - exclude("META-INF/LICENSE-notice.md") + jniLibs { + excludes += setOf("META-INF/*kotlin*") + } + resources { + excludes += setOf( + "META-INF/*kotlin*", + "META-INF/LICENSE.md", + "META-INF/LICENSE-notice.md" + ) + } } compileOptions { @@ -34,6 +40,7 @@ android { testOptions { animationsDisabled = true } + namespace = "com.quickbirdstudios.test" } dependencies { From 063b8223b53209449b5fd0ee9ac745d4f694b199 Mon Sep 17 00:00:00 2001 From: Orhun Kupeli Date: Thu, 1 Jun 2023 15:28:35 +0200 Subject: [PATCH 4/7] Adapt AndroidManifest.xml --- example/src/main/AndroidManifest.xml | 6 +++--- survey/src/main/AndroidManifest.xml | 3 +-- test/src/main/AndroidManifest.xml | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/example/src/main/AndroidManifest.xml b/example/src/main/AndroidManifest.xml index e61a351..72f4845 100644 --- a/example/src/main/AndroidManifest.xml +++ b/example/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> @@ -27,7 +26,8 @@ android:screenOrientation="portrait" tools:ignore="LockedOrientationActivity" tools:replace="android:appComponentFactory" - tools:targetApi="p"> + tools:targetApi="p" + android:exported="true"> diff --git a/survey/src/main/AndroidManifest.xml b/survey/src/main/AndroidManifest.xml index 60f3d29..8072ee0 100644 --- a/survey/src/main/AndroidManifest.xml +++ b/survey/src/main/AndroidManifest.xml @@ -1,3 +1,2 @@ - - + diff --git a/test/src/main/AndroidManifest.xml b/test/src/main/AndroidManifest.xml index 18e4a8d..d85909c 100644 --- a/test/src/main/AndroidManifest.xml +++ b/test/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> @@ -27,7 +26,8 @@ android:screenOrientation="portrait" tools:ignore="LockedOrientationActivity" tools:replace="android:appComponentFactory" - tools:targetApi="p"> + tools:targetApi="p" + android:exported="true"> From 29adf1c84cba6e0a79b21ff2968657570ec3ed7e Mon Sep 17 00:00:00 2001 From: Orhun Kupeli Date: Thu, 1 Jun 2023 17:11:29 +0200 Subject: [PATCH 5/7] Update kotlin and gradle to the latest version --- buildSrc/build.gradle.kts | 1 + buildSrc/src/main/kotlin/Deps.kt | 9 ++++----- example/build.gradle.kts | 9 ++++++--- gradle.properties | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 4 ++-- survey/build.gradle.kts | 8 +++++--- test/build.gradle.kts | 8 +++++--- 8 files changed, 28 insertions(+), 18 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index a48a82a..4ed1343 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -10,4 +10,5 @@ repositories { dependencies { implementation(gradleApi()) implementation(localGroovy()) + implementation("com.android.tools.build:gradle:8.0.2") } diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt index 0c8cd1d..1927734 100644 --- a/buildSrc/src/main/kotlin/Deps.kt +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -1,8 +1,7 @@ object Versions { - const val kotlin = "1.6.2" - const val kotlinPlugin = "1.6.20" - const val coroutines = "1.6.2" + const val kotlin = "1.8.20" + const val coroutines = "1.7.0" const val test = "1.1.1" const val jUnit = "5.5.2" const val jUnitPlatform = "1.5.2" @@ -28,12 +27,12 @@ object Versions { object Deps { object Plugins { - const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlinPlugin}" + const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}" } object Kotlin { const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}" - const val reflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlinPlugin}" + const val reflect = "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlin}" const val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutines}" const val androidCoroutines = diff --git a/example/build.gradle.kts b/example/build.gradle.kts index e9c37ad..5a6543f 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -3,12 +3,10 @@ import com.quickbirdstudios.surveykit.ApiKeys.yandexMapsKey plugins { id("com.android.application") + id("kotlin-parcelize") kotlin("android") - id("org.jetbrains.kotlin.android.extensions") } -androidExtensions { isExperimental = true } - android { compileSdkVersion = Project.Android.compileSdkVersion @@ -21,6 +19,11 @@ android { resValue("string", "google_api_key", googleMapsKey()) resValue("string", "yandex_api_key", yandexMapsKey()) } + + buildFeatures { + viewBinding = true + } + packagingOptions { jniLibs { excludes += setOf("META-INF/*kotlin*") diff --git a/gradle.properties b/gradle.properties index d14632b..63e7203 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,7 @@ org.gradle.parallel=true android.useAndroidX=true android.enableJetifier=true repositoryName=SurveyKit -projectSummary=Create beautiful surveys on Android \ No newline at end of file +projectSummary=Create beautiful surveys on Android +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 488e2e4..89c5115 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Jun 01 14:36:42 CEST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index edd91c0..985ce5d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,8 +7,8 @@ buildscript { dependencies { classpath("com.quickbirdstudios:gradle-publishing:0.1.0") - classpath("com.android.tools.build:gradle:7.4.2") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20") + classpath("com.android.tools.build:gradle:8.0.2") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20") } } diff --git a/survey/build.gradle.kts b/survey/build.gradle.kts index 4c6cd4a..5654608 100644 --- a/survey/build.gradle.kts +++ b/survey/build.gradle.kts @@ -3,12 +3,10 @@ plugins { id("com.android.library") kotlin("android") - id("org.jetbrains.kotlin.android.extensions") id("gradle-publishing") + id("kotlin-parcelize") } -androidExtensions { isExperimental = true } - android { compileSdkVersion = Project.Android.compileSdkVersion @@ -19,6 +17,10 @@ android { testInstrumentationRunner = Project.Android.testInstrumentationRunner } + buildFeatures { + viewBinding = true + } + testOptions { animationsDisabled = true } diff --git a/test/build.gradle.kts b/test/build.gradle.kts index 66e79bc..af98ca4 100644 --- a/test/build.gradle.kts +++ b/test/build.gradle.kts @@ -2,12 +2,10 @@ import com.quickbirdstudios.surveykit.ApiKeys.googleMapsKey plugins { id("com.android.application") + id("kotlin-parcelize") kotlin("android") - id("org.jetbrains.kotlin.android.extensions") } -androidExtensions { isExperimental = true } - android { compileSdkVersion(Project.Android.compileSdkVersion) @@ -32,6 +30,10 @@ android { } } + buildFeatures { + viewBinding = true + } + compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 From 8a35366edbc942f50abd726a4ea0215a79eb5f45 Mon Sep 17 00:00:00 2001 From: Orhun Kupeli Date: Thu, 1 Jun 2023 17:12:35 +0200 Subject: [PATCH 6/7] Adapt view binding changes --- .../example/ui/main/MainActivity.kt | 17 +++++++---------- example/src/main/res/layout/main_activity.xml | 8 ++++---- .../backend/presenter/PresenterImpl.kt | 6 +++--- .../backend/views/main_parts/Header.kt | 19 +++++++++++++------ .../backend/views/step/QuestionView.kt | 15 +++++++++++---- 5 files changed, 38 insertions(+), 27 deletions(-) diff --git a/example/src/main/java/com/quickbirdstudios/example/ui/main/MainActivity.kt b/example/src/main/java/com/quickbirdstudios/example/ui/main/MainActivity.kt index 5691cb8..c983fd5 100644 --- a/example/src/main/java/com/quickbirdstudios/example/ui/main/MainActivity.kt +++ b/example/src/main/java/com/quickbirdstudios/example/ui/main/MainActivity.kt @@ -6,12 +6,12 @@ import android.os.Parcelable import android.util.Log import android.view.KeyEvent import android.view.View -import android.view.ViewGroup import android.widget.Button import android.widget.EditText import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import com.quickbirdstudios.example.R +import com.quickbirdstudios.example.databinding.MainActivityBinding import com.quickbirdstudios.surveykit.AnswerFormat import com.quickbirdstudios.surveykit.FinishReason import com.quickbirdstudios.surveykit.Identifier @@ -36,16 +36,13 @@ import kotlinx.android.parcel.Parcelize class MainActivity : AppCompatActivity() { - private lateinit var survey: SurveyView - private lateinit var container: ViewGroup + private lateinit var binding: MainActivityBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setContentView(R.layout.main_activity) - - survey = findViewById(R.id.survey_view) - container = findViewById(R.id.surveyContainer) - setupSurvey(survey) + binding = MainActivityBinding.inflate(layoutInflater) + setContentView(binding.root) + setupSurvey(binding.surveyView) } private fun setupSurvey(surveyView: SurveyView) { @@ -194,7 +191,7 @@ class MainActivity : AppCompatActivity() { if (reason == FinishReason.Completed) { taskResult.results.forEach { stepResult -> Log.e("ASDF", "answer ${stepResult.results.firstOrNull()}") - container.removeAllViews() + binding.surveyContainer.removeAllViews() } } } @@ -216,7 +213,7 @@ class MainActivity : AppCompatActivity() { override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean { return if (keyCode == KeyEvent.KEYCODE_BACK) { - survey.backPressed() + binding.surveyView.backPressed() true } else false } diff --git a/example/src/main/res/layout/main_activity.xml b/example/src/main/res/layout/main_activity.xml index c697978..817d6e2 100644 --- a/example/src/main/res/layout/main_activity.xml +++ b/example/src/main/res/layout/main_activity.xml @@ -1,14 +1,14 @@ + android:orientation="vertical"> + android:layout_height="match_parent"> + diff --git a/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/PresenterImpl.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/PresenterImpl.kt index 25e77bd..b81f8e0 100644 --- a/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/PresenterImpl.kt +++ b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/presenter/PresenterImpl.kt @@ -7,10 +7,10 @@ import com.quickbirdstudios.surveykit.StepIdentifier import com.quickbirdstudios.surveykit.SurveyTheme import com.quickbirdstudios.surveykit.backend.navigator.TaskNavigator import com.quickbirdstudios.surveykit.backend.presenter.animations.ViewAnimator +import com.quickbirdstudios.surveykit.backend.views.step.QuestionView import com.quickbirdstudios.surveykit.backend.views.step.StepView import com.quickbirdstudios.surveykit.result.StepResult import com.quickbirdstudios.surveykit.steps.Step -import kotlinx.android.synthetic.main.view_question.view.* import java.util.Date import kotlin.coroutines.resume import kotlin.coroutines.suspendCoroutine @@ -101,8 +101,8 @@ internal class PresenterImpl( val previousQuestionView = currentQuestionView - if (!hasPreviousStep()) { - questionView.questionHeader?.canBack = false + if (!hasPreviousStep() && questionView is QuestionView) { + questionView.header.canBack = false } currentQuestionView = questionView diff --git a/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Header.kt b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Header.kt index f8d6701..c1573f8 100644 --- a/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Header.kt +++ b/survey/src/main/java/com/quickbirdstudios/surveykit/backend/views/main_parts/Header.kt @@ -4,15 +4,15 @@ import android.app.Activity import android.content.Context import android.graphics.Color import android.util.AttributeSet +import android.view.LayoutInflater import android.view.View import android.view.inputmethod.InputMethodManager -import android.widget.Button import android.widget.ImageView -import android.widget.RelativeLayout import android.widget.TextView import androidx.appcompat.widget.Toolbar import com.quickbirdstudios.surveykit.R import com.quickbirdstudios.surveykit.SurveyTheme +import com.quickbirdstudios.surveykit.databinding.LayoutHeaderBinding // TODO should take [Configuration] in constructor and remove public color setters and getters class Header @JvmOverloads constructor( @@ -21,6 +21,13 @@ class Header @JvmOverloads constructor( defStyleRes: Int = 0 ) : Toolbar(context, attrs, defStyleRes), StyleablePart { + private val root by lazy { + LayoutHeaderBinding.inflate( + LayoutInflater.from(context), + this, + false + ) + } //region Public API @@ -62,9 +69,9 @@ class Header @JvmOverloads constructor( //region Members - private val root: View = View.inflate(context, R.layout.layout_header, this) - private val headerLabel: TextView = root.findViewById(R.id.headerLabel) - private val buttonBack = root.findViewById(R.id.headerBackButton).apply { +// private val root: View = View.inflate(context, R.layout.layout_header, this) + private val headerLabel: TextView = root.headerLabel + private val buttonBack = root.headerBackButton.apply { setOnClickListener { hideKeyboard() onBack() @@ -74,7 +81,7 @@ class Header @JvmOverloads constructor( buttonBack.findViewById(R.id.headerBackButtonImage).apply { background.setTint(themeColor) } - private val cancelButton = root.findViewById