Coder Social home page Coder Social logo

greendaoutils's Introduction

GreenDaoUtils

GreenDao的代码生成器的优化版

使用方法:

一、添加两段代码:

1、在project的gralde里添加

maven { url "https://jitpack.io" }
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.0'

2、在当前项目的gradle里添加

compile 'com.github.SuperBeagleDog:GreenDaoUtils:1.0.4'

添加后如下所示,如下图所示:

project的gradle:

allprojects {
   repositories {
      jcenter()
      maven { url "https://jitpack.io" }
   }
}

buildscript {
   repositories {
     mavenCentral()
   }
   dependencies {
     classpath 'org.greenrobot:greendao-gradle-plugin:3.2.0'
   }
}

当前项目的gradle:

dependencies {
   compile 'com.github.SuperBeagleDog:GreenDaoUtils:1.0.3'
}

需要注意的一点是,这个工具已经集成了GreenDao的jar包,所以不要再在当前项目的gradle的depencies里面添加如下代码

重要的事说三遍,千万不要、不要、不要在gralde里再添加这一行代码!!!

compile 'org.greenrobot:greendao:3.2.0'

这样就已经配置好了代码生成器以及GreenDao的增删查改的优化工具。

但是,代码生成器需要开发者,自已定义要生成哪些Dao类,以及生成的GreenDao的相关类的存放路径, 源码在GreenDaoUtils的GDGenerator类里,可以自行定位到当前类,然后,复制里面的代码, 再自行修改即可。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.