Skip to content

Commit

Permalink
Updated gradle configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Willena committed Jan 16, 2021
1 parent 97ed93b commit 0959c56
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 45 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation project(":phoneinputview")

implementation project(":phoneinputview")
testImplementation 'junit:junit:4.12'
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jan 03 18:09:03 CET 2021
#Tue Jan 12 21:53:17 CET 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
81 changes: 40 additions & 41 deletions phoneinputview/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

repositories {
mavenCentral()
google()
jcenter()
maven { url "https://jitpack.io" }
}

group = 'com.github.willena'
version = '1.3.1-rc2'

android {
compileSdkVersion 29
Expand All @@ -10,53 +18,44 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 29
versionCode 13
versionName "1.3.1-rc1"
versionCode 14
versionName "1.3.1-rc2"
consumerProguardFiles 'proguard-rules.pro'
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.15'
testImplementation 'junit:junit:4.12'
}


// build a jar with source files
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
}

// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}

artifacts {
archives sourcesJar
archives javadocJar
}

// uncomment to build a jar file in addition to the default aar file
//android.libraryVariants.all { variant ->
// def name = variant.buildType.name
// def task = project.tasks.create "jar${name.capitalize()}", Jar
// task.dependsOn variant.javaCompile
// task.from variant.javaCompile.destinationDir
// artifacts.add('archives', task);
//}
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
from components.release
groupId = 'com.github.willena'
artifactId = 'phonenumber-widget'
version = '1.3.1-rc2'
}
}
}
}

0 comments on commit 0959c56

Please sign in to comment.