Skip to content

Commit 017b6c4

Browse files
committed
Adding some files
1 parent 604b7e9 commit 017b6c4

7 files changed

Lines changed: 78 additions & 45 deletions

File tree

api/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'maven'
23

34
android {
45
compileSdkVersion 25
@@ -29,3 +30,9 @@ dependencies {
2930
compile 'com.android.support:appcompat-v7:25.2.0'
3031
testCompile 'junit:junit:4.12'
3132
}
33+
34+
task sourcesJar(type: Jar) {
35+
from android.sourceSets.main.java.srcDirs
36+
classifier = 'sources'
37+
}
38+
artifacts.add('archives', sourcesJar)

api/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_NAME=api
2+
POM_DESCRIPTION=Foodora Api
3+
POM_ARTIFACT_ID=api
4+
POM_PACKAGING=aar

build.gradle

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apply plugin: "java"
2-
apply plugin: "maven"
2+
apply plugin: 'com.github.dcendents.android-maven' // ADD THIS
33
// Top-level build file where you can add configuration options common to all sub-projects/modules.
44

55
buildscript {
66
repositories {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:2.3.0'
11-
10+
classpath 'com.android.tools.build:gradle:2.3.1'
11+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
1414
}
@@ -21,54 +21,54 @@ allprojects {
2121
}
2222

2323
ext {
24-
versionName = "1.0.10"
24+
versionName = "1.0.15"
2525
versionCode = 2
2626
}
2727

2828
allprojects {
2929
version = "${versionName}"
3030
}
3131

32-
sourceSets {
33-
api
34-
core
35-
datastore
36-
}
37-
38-
sourceSets.all { set ->
39-
def jarTask = task("${set.name}Zip", type: Zip) {
40-
baseName = "$set.name"
41-
from set.output
42-
}
43-
44-
def javadoc = task(type: Javadoc) {
45-
failOnError false
46-
source = android.sourceSets.main.java.sourceFiles
47-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
48-
classpath += configurations.compile
49-
}
50-
51-
def javadocJar = task(type: Zip, dependsOn: javadoc) {
52-
classifier = "${set.name}"
53-
from javadoc.destinationDir
54-
}
55-
artifacts {
56-
archives jarTask
57-
archives javadocJar
58-
}
59-
}
32+
//sourceSets {
33+
// api
34+
// core
35+
// datastore
36+
//}
6037

61-
jar {
62-
from sourceSets.api.output
63-
from sourceSets.datastore.output
64-
from sourceSets.core.output
65-
}
38+
//sourceSets.all { set ->
39+
// def jarTask = task("${set.name}Jar", type: Jar) {
40+
// baseName = "$set.name"
41+
// classifier = ""
42+
// }
43+
//
44+
// def javadoc = task(type: Javadoc) {
45+
// failOnError false
46+
// source = android.sourceSets.main.java.sourceFiles
47+
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
48+
// classpath += configurations.compile
49+
// }
50+
//
51+
// def javadocJar = task(type: Jar, dependsOn: javadoc) {
52+
// classifier = "${set.name}"
53+
// from javadoc.destinationDir
54+
// }
55+
// artifacts {
56+
// archives jarTask
57+
// archives javadocJar
58+
// }
59+
//}
60+
//
61+
//jar {
62+
// from sourceSets.api.output
63+
// from sourceSets.datastore.output
64+
// from sourceSets.core.output
65+
//}
6666

67-
// this step is necessary when installing both jars in the local maven repository
68-
install {
69-
repositories.mavenInstaller {
70-
addFilter('api') { artifact, file -> artifact.name.endsWith('api') }
71-
addFilter('core') { artifact, file -> artifact.name.endsWith('core') }
72-
addFilter('datastore') { artifact, file -> artifact.name.endsWith('datastore') }
73-
}
74-
}
67+
//// this step is necessary when installing both jars in the local maven repository
68+
//install {
69+
// repositories.mavenInstaller {
70+
// addFilter('api') { artifact, file -> artifact.name.endsWith('api') }
71+
// addFilter('core') { artifact, file -> artifact.name.endsWith('core') }
72+
// addFilter('datastore') { artifact, file -> artifact.name.endsWith('datastore') }
73+
// }
74+
//}

core/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'maven'
23

34
android {
45
compileSdkVersion 25
@@ -29,3 +30,9 @@ dependencies {
2930
compile 'com.android.support:appcompat-v7:25.2.0'
3031
testCompile 'junit:junit:4.12'
3132
}
33+
34+
task sourcesJar(type: Jar) {
35+
from android.sourceSets.main.java.srcDirs
36+
classifier = 'sources'
37+
}
38+
artifacts.add('archives', sourcesJar)

core/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_NAME=core
2+
POM_DESCRIPTION=Foodora Core
3+
POM_ARTIFACT_ID=core
4+
POM_PACKAGING=aar

datastore/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'maven'
23

34
android {
45
compileSdkVersion 25
@@ -29,3 +30,9 @@ dependencies {
2930
compile 'com.android.support:appcompat-v7:25.2.0'
3031
testCompile 'junit:junit:4.12'
3132
}
33+
34+
task sourcesJar(type: Jar) {
35+
from android.sourceSets.main.java.srcDirs
36+
classifier = 'sources'
37+
}
38+
artifacts.add('archives', sourcesJar)

datastore/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_NAME=datastore
2+
POM_DESCRIPTION=Foodora DB Store
3+
POM_ARTIFACT_ID=datastore
4+
POM_PACKAGING=aar

0 commit comments

Comments
 (0)