Skip to content

Commit e14441a

Browse files
committed
Jitpack fix
1 parent 2bc76cd commit e14441a

File tree

8 files changed

+241
-300
lines changed

8 files changed

+241
-300
lines changed

build.gradle

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
repositories {
5-
jcenter()
6-
maven { url "https://plugins.gradle.org/m2/" }
7-
}
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:2.3.3'
10-
}
4+
repositories {
5+
jcenter()
6+
maven { url "https://plugins.gradle.org/m2/" }
7+
}
8+
dependencies {
9+
classpath 'com.android.tools.build:gradle:2.3.3'
10+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
11+
}
1112
}
1213

1314
allprojects {
14-
repositories {
15-
jcenter()
16-
}
15+
repositories {
16+
jcenter()
17+
}
1718
}
1819

1920
task clean(type: Delete) {
20-
delete rootProject.buildDir
21+
delete rootProject.buildDir
2122
}
2223

compiler-core/build.gradle

+17-21
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
apply plugin: 'java'
2+
apply plugin: 'maven'
3+
4+
group = gradle.ext.githubGroup
25

36
targetCompatibility = '1.7'
47
sourceCompatibility = '1.7'
58

69
dependencies {
7-
compile fileTree(dir: 'libs', include: ['*.jar'])
8-
compile gradle.ext.dep_javapoet
9-
compile gradle.ext.dep_guava
10+
compile fileTree(dir: 'libs', include: ['*.jar'])
11+
compile gradle.ext.dep_javapoet
12+
compile gradle.ext.dep_guava
1013
}
1114

12-
apply plugin: 'maven-publish'
13-
14-
publishing {
15-
publications {
16-
mavenJava(MavenPublication) {
17-
groupId gradle.ext.taskLibGroupId
18-
artifactId project.getName()
19-
version = gradle.ext.taskLibVersion
20-
from components.java
15+
task sourcesJar(type: Jar, dependsOn: classes) {
16+
classifier = 'sources'
17+
from sourceSets.main.allSource
18+
}
2119

22-
pom.withXml {
23-
def root = asNode()
24-
def license = root.appendNode('licenses').appendNode('license')
25-
license.appendNode('name', 'The Apache Software License, Version 2.0')
26-
license.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
27-
license.appendNode('distribution', 'repo')
28-
}
29-
}
30-
}
20+
task javadocJar(type: Jar, dependsOn: javadoc) {
21+
classifier = 'javadoc'
22+
from javadoc.destinationDir
3123
}
3224

25+
artifacts {
26+
archives sourcesJar
27+
archives javadocJar
28+
}

settings.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
include ':app', ':tasklib', ':taskcompiler', ':tasklib-core', ':compiler-core', ':tasklib-stetho', ':tasklib-test'
22

33

4-
gradle.ext.taskLibGroupId = "hu.axolotl"
5-
gradle.ext.taskLibVersion = "5.0.0-SNAPSHOT"
4+
gradle.ext.githubGroup = "com.github.AutSoft"
65

76

87
gradle.ext.buildToolsVersion = "25.0.2"

taskcompiler/build.gradle

+32-44
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,49 @@
11
apply plugin: 'java'
2+
apply plugin: 'maven'
23
apply plugin: 'jacoco'
34

5+
group = gradle.ext.githubGroup
6+
47
targetCompatibility = '1.7'
58
sourceCompatibility = '1.7'
69

710
jacoco {
8-
toolVersion = gradle.ext.jacoco_version
11+
toolVersion = gradle.ext.jacoco_version
912
}
1013

1114
configurations.all {
12-
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
15+
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
1316
}
1417

1518
dependencies {
16-
compile fileTree(include: ['*.jar'], dir: 'libs')
17-
compile 'com.google.auto.service:auto-service:1.0-rc2'
18-
compile 'com.google.auto:auto-common:0.6'
19-
compile 'javax.inject:javax.inject:1'
20-
compile project(':compiler-core')
21-
compile project(':tasklib-core')
22-
23-
testCompile project(':tasklib-core')
24-
testCompile gradle.ext.dep_junit
25-
testCompile gradle.ext.dep_googleTruth
26-
testCompile 'com.google.testing.compile:compile-testing:0.8'
27-
testCompile 'org.glassfish:javax.annotation:10.0-b28'
28-
//testCompile files(System.getenv("JAVA_HOME") + "/lib/tools.jar")
29-
testCompile files(org.gradle.internal.jvm.Jvm.current().getToolsJar())
30-
testRuntime files('build/resources/test')
19+
compile fileTree(include: ['*.jar'], dir: 'libs')
20+
compile 'com.google.auto.service:auto-service:1.0-rc2'
21+
compile 'com.google.auto:auto-common:0.6'
22+
compile 'javax.inject:javax.inject:1'
23+
compile project(':compiler-core')
24+
compile project(':tasklib-core')
25+
26+
testCompile project(':tasklib-core')
27+
testCompile gradle.ext.dep_junit
28+
testCompile gradle.ext.dep_googleTruth
29+
testCompile 'com.google.testing.compile:compile-testing:0.8'
30+
testCompile 'org.glassfish:javax.annotation:10.0-b28'
31+
testCompile files(System.getenv("JAVA_HOME") + "/lib/tools.jar")
32+
//testCompile files(org.gradle.internal.jvm.Jvm.current().getToolsJar())
33+
testRuntime files('build/resources/test')
34+
}
35+
36+
task sourcesJar(type: Jar, dependsOn: classes) {
37+
classifier = 'sources'
38+
from sourceSets.main.allSource
3139
}
3240

41+
task javadocJar(type: Jar, dependsOn: javadoc) {
42+
classifier = 'javadoc'
43+
from javadoc.destinationDir
44+
}
3345

34-
apply plugin: 'maven-publish'
35-
36-
publishing {
37-
publications {
38-
mavenJava(MavenPublication) {
39-
groupId gradle.ext.taskLibGroupId
40-
artifactId project.getName()
41-
version = gradle.ext.taskLibVersion
42-
//artifact sourcesJar
43-
from components.java
44-
45-
pom.withXml {
46-
asNode().dependencies.'*'.findAll() {
47-
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
48-
dep.name == it.artifactId.text()
49-
}
50-
}.each() {
51-
it.scope*.value = 'compile'
52-
}
53-
def root = asNode()
54-
def license = root.appendNode('licenses').appendNode('license')
55-
license.appendNode('name', 'The Apache Software License, Version 2.0')
56-
license.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
57-
license.appendNode('distribution', 'repo')
58-
}
59-
}
60-
}
46+
artifacts {
47+
archives sourcesJar
48+
archives javadocJar
6149
}

tasklib-core/build.gradle

+22-25
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
11
apply plugin: 'java'
2+
apply plugin: 'maven'
3+
4+
group = gradle.ext.githubGroup
25

36
targetCompatibility = "1.7"
47
sourceCompatibility = "1.7"
58

69
apply plugin: 'jacoco'
710
jacoco {
8-
toolVersion = gradle.ext.jacoco_version
11+
toolVersion = gradle.ext.jacoco_version
912
}
1013

1114
dependencies {
12-
compile fileTree(dir: 'libs', include: ['*.jar'])
15+
compile fileTree(dir: 'libs', include: ['*.jar'])
16+
17+
compile gradle.ext.dep_rxjava
18+
compile gradle.ext.dep_guava
1319

14-
compile gradle.ext.dep_rxjava
15-
compile gradle.ext.dep_guava
20+
testCompile gradle.ext.dep_junit
21+
testCompile gradle.ext.dep_googleTruth
22+
}
23+
24+
task sourcesJar(type: Jar, dependsOn: classes) {
25+
classifier = 'sources'
26+
from sourceSets.main.allSource
27+
}
1628

17-
testCompile gradle.ext.dep_junit
18-
testCompile gradle.ext.dep_googleTruth
29+
task javadocJar(type: Jar, dependsOn: javadoc) {
30+
classifier = 'javadoc'
31+
from javadoc.destinationDir
1932
}
2033

21-
apply plugin: 'maven-publish'
22-
23-
publishing {
24-
publications {
25-
mavenJava(MavenPublication) {
26-
groupId gradle.ext.taskLibGroupId
27-
artifactId project.getName()
28-
version = gradle.ext.taskLibVersion
29-
from components.java
30-
31-
pom.withXml {
32-
def root = asNode()
33-
def license = root.appendNode('licenses').appendNode('license')
34-
license.appendNode('name', 'The Apache Software License, Version 2.0')
35-
license.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
36-
license.appendNode('distribution', 'repo')
37-
}
38-
}
39-
}
34+
artifacts {
35+
archives sourcesJar
36+
archives javadocJar
4037
}

tasklib-stetho/build.gradle

+37-56
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,64 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
4+
group = gradle.ext.githubGroup
25

36
sourceCompatibility = "1.7"
47
targetCompatibility = "1.7"
58

69
android {
7-
compileSdkVersion gradle.ext.compileSdkVersion
8-
buildToolsVersion gradle.ext.buildToolsVersion
10+
compileSdkVersion gradle.ext.compileSdkVersion
11+
buildToolsVersion gradle.ext.buildToolsVersion
912

10-
defaultConfig {
11-
minSdkVersion gradle.ext.minSdkVersion
12-
targetSdkVersion gradle.ext.targetSdkVersion
13-
versionCode 2
14-
versionName "DO_NOT_EDIT"
13+
defaultConfig {
14+
minSdkVersion gradle.ext.minSdkVersion
15+
targetSdkVersion gradle.ext.targetSdkVersion
16+
versionCode 2
17+
versionName "DO_NOT_EDIT"
1518

16-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17-
}
18-
buildTypes {
19-
release {
20-
//minifyEnabled false
21-
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22-
consumerProguardFiles 'proguard-rules.pro'
23-
}
24-
}
19+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
20+
}
21+
buildTypes {
22+
release {
23+
//minifyEnabled false
24+
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25+
consumerProguardFiles 'proguard-rules.pro'
26+
}
27+
}
2528
}
2629

2730
dependencies {
28-
compile fileTree(dir: 'libs', include: ['*.jar'])
29-
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
30-
exclude group: 'com.android.support', module: 'support-annotations'
31-
})
32-
compile gradle.ext.dep_appcompat
33-
compile gradle.ext.dep_stetho
34-
compile gradle.ext.dep_gson
35-
36-
compile project(':tasklib-core')
37-
compile project(':tasklib')
38-
39-
testCompile gradle.ext.dep_junit
40-
}
41-
42-
apply plugin: 'maven-publish'
31+
compile fileTree(dir: 'libs', include: ['*.jar'])
32+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
33+
exclude group: 'com.android.support', module: 'support-annotations'
34+
})
35+
compile gradle.ext.dep_appcompat
36+
compile gradle.ext.dep_stetho
37+
compile gradle.ext.dep_gson
4338

44-
publishing {
45-
publications {
46-
aar(MavenPublication) {
47-
groupId gradle.ext.taskLibGroupId
48-
artifactId project.getName()
49-
version = gradle.ext.taskLibVersion
50-
artifact("${project.buildDir}/outputs/aar/${project.getName()}-release.aar")
51-
artifact androidJavadocsJar
39+
compile project(':tasklib-core')
40+
compile project(':tasklib')
5241

53-
pom.withXml {
54-
def root = asNode()
55-
def license = root.appendNode('licenses').appendNode('license')
56-
license.appendNode('name', 'The Apache Software License, Version 2.0')
57-
license.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
58-
license.appendNode('distribution', 'repo')
59-
}
60-
}
61-
}
42+
testCompile gradle.ext.dep_junit
6243
}
6344

6445
task androidJavadocs(type: Javadoc) {
65-
source = android.sourceSets.main.java.srcDirs
66-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
46+
source = android.sourceSets.main.java.srcDirs
47+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
6748
}
6849

6950
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
70-
classifier = 'javadoc'
71-
from androidJavadocs.destinationDir
51+
classifier = 'javadoc'
52+
from androidJavadocs.destinationDir
7253
}
7354

7455
task androidSourcesJar(type: Jar) {
75-
classifier = 'sources'
76-
from android.sourceSets.main.java.srcDirs
56+
classifier = 'sources'
57+
from android.sourceSets.main.java.srcDirs
7758
}
7859

7960
artifacts {
80-
archives androidSourcesJar
81-
archives androidJavadocsJar
61+
archives androidSourcesJar
62+
archives androidJavadocsJar
8263
}
8364

0 commit comments

Comments
 (0)