Skip to content

Commit

Permalink
Update AGP.
Browse files Browse the repository at this point in the history
Update maven publishing.
  • Loading branch information
tomergoldst committed Jan 11, 2022
1 parent 04bf25b commit af664f7
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 45 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
compileSdkVersion 31

defaultConfig {
applicationId "com.tomergoldst.tooltipsdemo"
minSdkVersion 14
targetSdkVersion 30
targetSdkVersion 31
versionCode 2
versionName "1.1"
}
Expand All @@ -20,7 +20,7 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.13.1'
implementation 'com.google.android.material:material:1.3.0'
testImplementation 'junit:junit:4.13.2'
implementation 'com.google.android.material:material:1.4.0'
implementation project(path: ':tooltips')
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -17,7 +16,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
25 changes: 24 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,27 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
android.useAndroidX=true

GROUP=com.tomergoldst.android
POM_ARTIFACT_ID=tooltips
VERSION_NAME=1.1.1

POM_NAME=tooltips
POM_PACKAGING=aar

POM_DESCRIPTION=Simple to use library for android, enabling to add a tooltip near any view with ease
POM_INCEPTION_YEAR=2016

POM_URL=https://github.com/tomergoldst/tooltips
POM_SCM_URL=https://github.com/tomergoldst/tooltips
POM_SCM_CONNECTION=scm:git@github.com:tomergoldst/tooltips.git
POM_SCM_DEV_CONNECTION=scm:git@github.com:tomergoldst/tooltips.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=tomergoldst
POM_DEVELOPER_NAME=Tomer Goldstein
POM_DEVELOPER_URL=https://github.com/tomergoldst
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Feb 15 20:02:18 IST 2021
#Mon Jan 10 18:55:02 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
zipStoreBase=GRADLE_USER_HOME
54 changes: 23 additions & 31 deletions tooltips/build.gradle
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
apply plugin: 'com.android.library'

ext {
bintrayRepo = 'maven'
bintrayName = 'tooltips'

publishedGroupId = 'com.tomergoldst.android'
libraryName = 'ToolTips'
artifact = 'tooltips'

libraryDescription = 'Simple to use library for android, enabling to add a tooltip near any view with ease'

siteUrl = 'https://github.com/tomergoldst/tooltips'
gitUrl = 'https://github.com/tomergoldst/tooltips.git'

libraryVersion = '1.1.1'

developerId = 'tomergoldst'
developerName = 'Tomer Goldstein'
developerEmail = 'tomergoldst2@gmail.com'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
apply plugin: 'com.vanniktech.maven.publish'

File localPropsFile = project.rootProject.file('local.properties')
if (localPropsFile.exists()) {
// Read local.properties file first if it exists
def localProps = new Properties()
new FileInputStream(localPropsFile).withCloseable { is -> localProps.load(is) }
localProps.each { name, value -> ext[name] = value }
}

android {
compileSdkVersion 30
compileSdkVersion 31

defaultConfig {
minSdkVersion 14
targetSdkVersion 30
targetSdkVersion 31
versionCode 14
versionName "1.1.1"
}
Expand All @@ -39,13 +24,20 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

publishing {
repositories {
maven {
def releasesRepoUrl = "$buildDir/repos/releases"
def snapshotsRepoUrl = "$buildDir/repos/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.13.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.0'
}

0 comments on commit af664f7

Please sign in to comment.