Skip to content

Commit b6832ef

Browse files
committed
Make the project ready for publication. With a nice build.gradle that allows bintray uploading.
1 parent e238204 commit b6832ef

File tree

3 files changed

+45
-95
lines changed

3 files changed

+45
-95
lines changed

.idea/gradle.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2016.
33
*
4-
* This file is part of ProcessManager.
4+
* This file is part of kotlinsql.
55
*
66
* This file is licenced to you under the Apache License, Version 2.0 (the
77
* "License"); you may not use this file except in compliance
@@ -18,9 +18,6 @@
1818
* under the License.
1919
*/
2020

21-
ext {
22-
if (! rootProject.ext.has('kotlin_version') ) { kotlin_version = '1.0.1-2' }
23-
}
2421

2522
buildscript {
2623

@@ -36,60 +33,64 @@ buildscript {
3633
}
3734
}
3835

36+
plugins {
37+
id "com.jfrog.bintray" version "1.6"
38+
}
39+
3940
apply plugin: 'kotlin'
40-
apply plugin: 'idea'
41-
apply plugin: 'kotlinsql.builder'
41+
apply plugin: 'maven-publish'
4242

43+
sourceCompatibility = JavaVersion.VERSION_1_6
44+
targetCompatibility = JavaVersion.VERSION_1_6
4345

44-
description = 'A utility library for working with databases in kotlin'
46+
version '0.5'
4547

46-
repositories {
47-
jcenter()
48-
}
48+
bintray {
49+
user = bintrayUser
50+
key = bintrayApiKey
51+
publications = ['MyPublication']
52+
53+
pkg {
54+
repo = 'maven'
55+
name = 'gradle-codegen'
56+
userOrg = 'pdvrieze'
57+
licenses = ['Apache-2.0']
58+
vcsUrl = 'https://github.com/pdvrieze/gradle-codegen.git'
4959

50-
test {
51-
useTestNG()
60+
version {
61+
name = project.version
62+
desc = 'Initial release of functionality. In this release, generators can only use a single output file.'
63+
released = new Date()
64+
vcsTag = '0.5'
65+
// attributes = [ 'gradle-plugin': 'net.devrieze.gradlecodegen:' ]
66+
}
67+
}
5268
}
5369

54-
sourceSets {
55-
main {
56-
generate {
57-
def depth = 10
58-
databaseFunctions{
59-
output = 'kotlin/gen/DatabaseMethods.kt'
60-
generator = "kotlinsql.builder.GenerateDatabaseBaseKt"
61-
input = depth
62-
}
63-
selects{
64-
output = 'kotlin/gen/selectImpls.kt'
65-
generator = "kotlinsql.builder.GenerateSelectClasses"
66-
input = depth
67-
}
68-
statements{
69-
output = 'kotlin/gen/statementImpls.kt'
70-
generator = "kotlinsql.builder.GenerateStatementsKt"
71-
input = depth
72-
}
73-
inserts{
74-
output = 'kotlin/gen/Inserts.kt'
75-
generator = "kotlinsql.builder.GenerateInsertsKt"
76-
input = depth
70+
publishing {
71+
publications {
72+
MyPublications(MavenPublication) {
73+
from components.java
74+
groupId 'net.devrieze'
75+
artifactId 'gradle-codegen'
76+
77+
artifact sourceJar {
78+
classifier "sources"
7779
}
7880
}
7981
}
8082
}
8183

8284
dependencies {
85+
compile gradleApi()
8386
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
84-
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
85-
86-
generatorsCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
87+
}
8788

88-
testCompile 'org.testng:testng:6.9.9'
89+
task sourceJar(type:Jar) {
90+
from sourceSets.main.allJava
91+
from sourceSets.main.kotlin
8992
}
9093

91-
idea{
92-
module {
93-
downloadSources = true
94-
}
95-
}
94+
repositories {
95+
jcenter()
96+
}

buildSrc/build.gradle

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)