Posted on

gradle repositories https

repositories {
        jcenter()
        mavenCentral()
    }

Dependency Management Basics

http://stackoverflow.com/questions/27056733/change-gradle-mavencentral-url-to-my-repo

https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.dsl.RepositoryHandler.html

jcenter – The URL used to access this repository is “https://jcenter.bintray.com/”

mavenCentral – https://repo1.maven.org/maven2/

repositories {
      maven {url "http://repo1.maven.org/maven2"}
    }
Posted on

POJO, equals, hashcode

How to simplify developing of pojo classes?

Problems:

  • pojo class is simple class with members, getters, setters. To keep test coverage more  80% we should develop tests for pojo classes. But it is a ridiculous.
  • do not forget to add new members to equals and hashcode methods.

Decisions:

  • Lombok. We have to type just members of class and use annotations. But there are problems:
    • final members without initialization
    • there are conflicts in annotationProcessor
  • AutoValue. by Google.
    • complicated to use
    • generate child class
  • Kotlin data classes.
    • by Google
    • no problems in annotationProcessor
    • we use Kotlin!!!