coomar2841 / android-multipicker-library

Android Multipicker Library
Apache License 2.0
439 stars 107 forks source link

Failed to build android-multipicker library dev. #91

Closed PaulTsai20160627 closed 7 years ago

PaulTsai20160627 commented 7 years ago

Hi Author:

Here is one question encountered when build the multipicker project. It shows No such property: scmUrl for class: org.gradle.api.publication.maven.internal.pom.CustomModeBuilder when clean project. I do not know the scmUrl is when build it can you show me the url is ? or how to fix this tech. problems? Below is my build gradle files

Hope you can feedback me asap.

Thanks you !

app/bulid.gradle

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    signingConfigs {
        release {
            keyAlias ""
            keyPassword ""
            storeFile file('../extras/release.keystore')
            storePassword ""
        }
    }
    compileSdkVersion 24
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "com.kbeanie.multipicker.sample"
        minSdkVersion 10
        targetSdkVersion 24
        versionCode 12
        versionName "1.1.3"
    }
    buildTypes {
        release {
            minifyEnabled false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
}

gradle.taskGraph.whenReady { taskGraph ->
    if (taskGraph.hasTask(':app:assembleRelease')) {
        /**
         * Configure Release key
         */
        def props = new Properties()
        props.load(new FileInputStream(rootProject.file("extras/secret.properties")))
        android.signingConfigs.release.keyAlias props.alias
        android.signingConfigs.release.storePassword props.getProperty('keyStorePassword')
        android.signingConfigs.release.keyPassword props.getProperty('keyAliasPassword')
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile project(':multipicker')
    compile('com.crashlytics.sdk.android:crashlytics:2.6.1@aar') {
        transitive = true;
    }
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.google.android.gms:play-services-base:9.6.1'
    compile 'com.google.android.gms:play-services-ads:9.6.1'
    compile 'com.android.support:recyclerview-v7:24.2.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:1.0.1'
    compile 'com.kbeanie:multipicker:1.1.31@aar'
}

android-multipicker-librart-dev/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
//        compile group:'com.kbeanie', name:'multipicker', version:'1.1.31'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

gradle/gradle.properties

Wed Mar 15 09:17:39 CST 2017

sonatypeUsername=

sonatypePassword=

sonatypeRepo=

scmUrl=

multipicker/build.gradle

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'

version = "1.1.4"
group = "com.kbeanie"

signing {
    required {
        has("release") && gradle.taskGraph.hasTask("uploadArchives")
    }
    sign configurations.archives
}

uploadArchives {
    configuration = configurations.archives
    repositories.mavenDeployer {
        beforeDeployment {
            MavenDeployment deployment -> signing.signPom(deployment)
        }

        pom.groupId = "com.kbeanie"
        pom.artifactId = "multipicker"
        pom.version = version

//        repository(url: sonatypeRepo) {
//            authentication(userName: sonatypeUsername,
//                    password: sonatypePassword)
//        }
        repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
            authentication(userName: {sonatypeUsername}, password: {sonatypePassword})
        }

        snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots') {
            authentication(userName: {sonatypeUsername}, password: {sonatypePassword})
        }

        pom.project {
            name 'Android Multipicker Library'
            packaging 'aar'
            description 'Multipicker Library for Android Applications'
            url 'https://github.com/coomar2841/android-multipicker-library'

            scm {
                url scmUrl
                connection scmUrl
                developerConnection scmUrl
            }

            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 'coomar2841'
                    name 'Kumar Bibek'
                    email 'coomar.101@gmail.com'
                }
            }
        }
    }
}

android {
    compileSdkVersion 24
    buildToolsVersion '24.0.3'

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    sourceSets{
        main{
            java {
                exclude 'com.kbeanie.multipicker.test'
            }
        }
    }
}

dependencies {
    provided 'com.android.support:appcompat-v7:24.2.1'
    compile 'junit:junit:4.12'
    compile 'com.android.support:support-v4:24.2.1'
    compile 'com.kbeanie:multipicker:1.1.31@aar'
}
coomar2841 commented 7 years ago

In multipicker/build.gradle, add these lines.

def sonatypeRepo = ""
def sonatypeUsername = ""
def sonatypePassword = ""
def scmUrl = ""