Created
November 29, 2017 08:32
-
-
Save striboldt/f4963ed89b12773c0cd08f00ed9b275f to your computer and use it in GitHub Desktop.
Gradle Invalid publication sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
maven { url 'https://maven.fabric.io/public' } | |
google() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.0.1' | |
classpath 'io.fabric.tools:gradle:1.24.1' | |
} | |
} | |
allprojects { | |
repositories { | |
jcenter() | |
maven { url 'https://maven.fabric.io/public' } | |
flatDir { | |
dirs 'libs-all' | |
} | |
google() | |
} | |
} | |
task clean(type: Delete) { | |
delete rootProject.buildDir | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
apply plugin: 'maven-publish' | |
apply plugin: 'maven' | |
android { | |
compileSdkVersion 25 | |
buildToolsVersion '26.0.3' | |
defaultConfig { | |
minSdkVersion 23 | |
targetSdkVersion 25 | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
lintOptions { | |
abortOnError true | |
disable 'LintError' | |
} | |
} | |
dependencies { | |
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { | |
exclude group: 'com.android.support', module: 'support-annotations' | |
}) | |
implementation 'com.android.support:appcompat-v7:25.4.0' | |
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { | |
transitive = true; | |
} | |
testImplementation 'junit:junit:4.12' | |
testImplementation 'org.mockito:mockito-core:1.10.19' | |
testImplementation "org.powermock:powermock-module-junit4:1.6.5" | |
testImplementation "org.powermock:powermock-api-mockito:1.6.5" | |
} | |
task copyDependenciesToLib(type: Copy) { | |
from configurations.findByName('compile') | |
into "${project.rootDir}/module/libs-all" | |
} | |
preBuild.dependsOn(copyDependenciesToLib) | |
publishing { | |
publications { | |
AndroidDebug(MavenPublication) { | |
groupId "${GROUP}" | |
artifactId "${POM_ARTIFACT_ID}" | |
version "${VERSION_NAME}" | |
artifact "$buildDir/outputs/aar/module-debug.aar" | |
} | |
AndroidRelease(MavenPublication) { | |
groupId "${GROUP}" | |
artifactId "${POM_ARTIFACT_ID}" | |
version "${VERSION_NAME}" | |
artifact "$buildDir/outputs/aar/module-release.aar" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
distributionBase=GRADLE_USER_HOME | |
distributionPath=wrapper/dists | |
zipStoreBase=GRADLE_USER_HOME | |
zipStorePath=wrapper/dists | |
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-all.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.gradle.jvmargs=-Xmx1536m | |
POM_ARTIFACT_ID=generic-service | |
POM_PACKAGING=aar | |
VERSION_NAME=0.1-SNAPSHOT | |
GROUP=x.y.z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment