Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #14 from novoda/add_release_plugin
Browse files Browse the repository at this point in the history
Add release plugin
  • Loading branch information
ouchadam committed Nov 24, 2014
2 parents 266c8a1 + b996412 commit 7a4da34
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 91 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,26 @@ This project uses [sqlite-jdbc](https://bitbucket.org/xerial/sqlite-jdbc) to cre

## Adding to your project

To integrate sqliteAnalyzer into your project, it is recommended for now that you depend directly on the sources. See the setup under the `buildSrc` sub-directory for an example.
To integrate sqliteAnalyzer into your project, it is recommended for now that you depend directly on the sources. See the setup under the
`buildSrc` sub-directory for an example.

After you've added the sources to `buildSrc`, you can start using this library, add these lines to the `build.gradle` of your project:
If you prefer you can use it from jcenter directly, just add these lines to the build.gradle of your project:

```groovy
apply plugin: 'sqlite-access'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.novoda:sqlite-analyzer:0.0.1-beta'
}
}
```

After you've added the sources to `buildSrc` or added the buildscript dependency, you can start using this library, add these lines to the `build.gradle` of your project:

```groovy
apply plugin: 'sqlite-analyzer'
sqliteAccess {
migrationsDir 'src/main/assets/migrations'
Expand Down
107 changes: 19 additions & 88 deletions analyzer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:0.2.4'
}
}

apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'bintray-release'

repositories {
mavenCentral()
}

dependencies {
compile 'org.xerial:sqlite-jdbc:3.8.7'
Expand All @@ -20,92 +25,18 @@ dependencies {
}

group = 'com.novoda'
version = "0.0.1-SNAPSHOT"
version = "0.0.1-beta"

ext {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from groovydoc
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

artifacts {
archives jar
archives javadocJar
archives sourcesJar
}

if (project.hasProperty("signing.keyId")) {
signing {
sign configurations.archives
}
}

uploadArchives {
repositories {
mavenDeployer {

// don't sign snapshots for now
if (!version.endsWith('SNAPSHOT')) {
beforeDeployment { deployment -> signing.signPom(deployment) }
}

if (project.hasProperty('nexusUsername')) {
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: nexusUsername, password: nexusPassword)
}

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: nexusUsername, password: nexusPassword)
}
}
uniqueVersion = false

pom.artifactId = 'sqlite-analyzer'
pom.project {

parent {
groupId 'org.sonatype.oss'
artifactId 'oss-parent'
version '7'
}

name 'sqliteAnalyzer Gradle Plugin'
packaging 'jar'
description 'Code generation for sqlite database access.'
url 'https://github.com/novoda/sqliteAnalyzer'

scm {
url 'https://github.com/novoda/sqliteAnalyzer'
connection 'scm:https://[email protected]/novoda/sqliteAnalyzer.git'
developerConnection 'scm:[email protected]:novoda/sqliteAnalyzer.git'
}

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

developers {
developer {
id 'devisnik'
name 'Volker Leck'
}
}
}
}
}
publish {
userOrg = 'novoda'
groupId = 'com.novoda'
artifactId = 'sqlite-analyzer'
version = project.version
description = 'Code generation for Java/Android database access.'
website = 'https://github.com/novoda/sqlite-analyzer'
}


0 comments on commit 7a4da34

Please sign in to comment.