diff --git a/base/build.gradle b/base/build.gradle
index 42202efe1..278355130 100644
--- a/base/build.gradle
+++ b/base/build.gradle
@@ -1,10 +1,12 @@
-group = 'com.github.thellmund.Android-Week-View'
-version = '5.2.2'
-
-apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
+ext {
+ PUBLISH_ARTIFACT_ID = 'base'
+}
+
+apply from: "${rootProject.projectDir}/scripts/publish-mavencentral.gradle"
+
android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
diff --git a/base/consumer-rules.pro b/base/consumer-rules.pro
deleted file mode 100644
index e69de29bb..000000000
diff --git a/base/proguard-rules.pro b/base/proguard-rules.pro
deleted file mode 100644
index 481bb4348..000000000
--- a/base/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 9641baaca..a922174c2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,18 +3,19 @@
buildscript {
apply from: 'dependencies.gradle'
repositories {
- jcenter()
google()
+ jcenter()
+ mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.1'
+ classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
- classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'org.jlleitschuh.gradle:ktlint-gradle:9.2.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.28.0'
+ classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.10.2'
}
}
@@ -30,8 +31,8 @@ allprojects {
apply plugin: 'org.jlleitschuh.gradle.ktlint'
repositories {
- jcenter()
mavenCentral()
google()
+ jcenter()
}
}
diff --git a/core/build.gradle b/core/build.gradle
index 8d33d943a..c4bda19af 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -1,10 +1,12 @@
-group = 'com.github.thellmund.Android-Week-View'
-version = '5.2.2'
-
-apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
+ext {
+ PUBLISH_ARTIFACT_ID = 'core'
+}
+
+apply from: "${rootProject.projectDir}/scripts/publish-mavencentral.gradle"
+
android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
diff --git a/core/gradle.properties b/core/gradle.properties
deleted file mode 100644
index 808dd7415..000000000
--- a/core/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-POM_NAME=Android Week View
-POM_ARTIFACT_ID=android-week-view
-POM_PACKAGING=aar
\ No newline at end of file
diff --git a/core/proguard-rules.pro b/core/proguard-rules.pro
deleted file mode 100644
index 23ac0c837..000000000
--- a/core/proguard-rules.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in D:/Program Files (x86)/Android/android-studio/sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/emoji/build.gradle b/emoji/build.gradle
index c76074bdb..6086d70dd 100644
--- a/emoji/build.gradle
+++ b/emoji/build.gradle
@@ -1,10 +1,12 @@
-group = 'com.github.thellmund.Android-Week-View'
-version = '5.2.2'
-
-apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
+ext {
+ PUBLISH_ARTIFACT_ID = 'emoji'
+}
+
+apply from: "${rootProject.projectDir}/scripts/publish-mavencentral.gradle"
+
android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
diff --git a/emoji/consumer-rules.pro b/emoji/consumer-rules.pro
deleted file mode 100644
index e69de29bb..000000000
diff --git a/emoji/proguard-rules.pro b/emoji/proguard-rules.pro
deleted file mode 100644
index 481bb4348..000000000
--- a/emoji/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index aa88615ec..5bac8ac50 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,15 +1 @@
-VERSION_NAME=5.2.2
-GROUP=com.github.thellmund
-
-POM_DESCRIPTION=An Android library to display customizable calendar views
-POM_URL=https://github.com/thellmund/Android-Week-View
-POM_SCM_URL=https://github.com/thellmund/Android-Week-View
-POM_SCM_CONNECTION=scm:git@github.com/thellmund/Android-Week-View.git
-POM_SCM_DEV_CONNECTION=scm:git@github.com:thellmund/Android-Week-View.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=thellmund
-POM_DEVELOPER_NAME=Till Hellmund
-
android.useAndroidX=true
diff --git a/jodatime/build.gradle b/jodatime/build.gradle
index dea20a13f..43662a148 100644
--- a/jodatime/build.gradle
+++ b/jodatime/build.gradle
@@ -1,10 +1,12 @@
-group = 'com.github.thellmund.Android-Week-View'
-version = '5.2.2'
-
-apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
+ext {
+ PUBLISH_ARTIFACT_ID = 'jodatime'
+}
+
+apply from: "${rootProject.projectDir}/scripts/publish-mavencentral.gradle"
+
android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
@@ -25,7 +27,6 @@ dependencies {
implementation libraries.jodaTimeAndroid
testImplementation libraries.jodaTime
-
testImplementation testing.jUnit
testImplementation testing.mockitoCore
testImplementation testing.mockitoInline
diff --git a/jodatime/consumer-rules.pro b/jodatime/consumer-rules.pro
deleted file mode 100644
index e69de29bb..000000000
diff --git a/jodatime/proguard-rules.pro b/jodatime/proguard-rules.pro
deleted file mode 100644
index f1b424510..000000000
--- a/jodatime/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/jsr310/build.gradle b/jsr310/build.gradle
index cbdbc2cdb..f3db0d284 100644
--- a/jsr310/build.gradle
+++ b/jsr310/build.gradle
@@ -1,10 +1,12 @@
-group = 'com.github.thellmund.Android-Week-View'
-version = '5.2.2'
-
-apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
+ext {
+ PUBLISH_ARTIFACT_ID = 'jsr310'
+}
+
+apply from: "${rootProject.projectDir}/scripts/publish-mavencentral.gradle"
+
android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
diff --git a/jsr310/consumer-rules.pro b/jsr310/consumer-rules.pro
deleted file mode 100644
index e69de29bb..000000000
diff --git a/jsr310/proguard-rules.pro b/jsr310/proguard-rules.pro
deleted file mode 100644
index f1b424510..000000000
--- a/jsr310/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/sample/proguard-rules.pro b/sample/proguard-rules.pro
deleted file mode 100644
index c1fc63ea7..000000000
--- a/sample/proguard-rules.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in D:\Program Files (x86)\Android\android-studio\sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class title to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml
index b65af9d17..431888d4e 100644
--- a/sample/src/main/AndroidManifest.xml
+++ b/sample/src/main/AndroidManifest.xml
@@ -3,8 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.alamkanak.weekview.sample">
-
-
+ ext[name] = value
+ }
+} else {
+ ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
+ ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
+ ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE')
+ ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME')
+ ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD')
+ ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')
+}
+
+publishing {
+ publications {
+ release(MavenPublication) {
+ groupId PUBLISH_GROUP_ID
+ artifactId PUBLISH_ARTIFACT_ID
+ version PUBLISH_VERSION
+
+ if (project.plugins.findPlugin("com.android.library")) {
+ artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
+ } else {
+ artifact("$buildDir/libs/${project.getName()}-${version}.jar")
+ }
+
+ artifact androidSourcesJar
+ artifact javadocJar
+
+ pom {
+ name = PUBLISH_ARTIFACT_ID
+ description = 'Display highly customizable calendar views in your Android app'
+ url = 'https://github.com/thellmund/Android-Week-View'
+ packaging = 'aar'
+ licenses {
+ license {
+ name = 'The Apache Software License, Version 2.0'
+ url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
+ }
+ developers {
+ developer {
+ id = 'thellmund'
+ name = 'Till Hellmund'
+ email = 'thellmund@gmail.com'
+ }
+ }
+ scm {
+ connection = 'scm:git:github.com/thellmund/Android-Week-View.git'
+ developerConnection = 'scm:git:ssh://github.com/thellmund/Android-Week-View.git'
+ url = 'https://github.com/thellmund/Android-Week-View/tree/main'
+ }
+ withXml {
+ def dependenciesNode = asNode().appendNode('dependencies')
+
+ project.configurations.implementation.allDependencies.each {
+ def dependencyNode = dependenciesNode.appendNode('dependency')
+ dependencyNode.appendNode('groupId', it.group)
+ dependencyNode.appendNode('artifactId', it.name)
+ dependencyNode.appendNode('version', it.version)
+ }
+ }
+ }
+ }
+ }
+ repositories {
+ maven {
+ name = "sonatype"
+ url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
+
+ credentials {
+ username ossrhUsername
+ password ossrhPassword
+ }
+ }
+ }
+}
+
+signing {
+ sign publishing.publications
+}
diff --git a/threetenabp/build.gradle b/threetenabp/build.gradle
index 196db8cad..ade15f6ef 100644
--- a/threetenabp/build.gradle
+++ b/threetenabp/build.gradle
@@ -1,10 +1,12 @@
-group = 'com.github.thellmund.Android-Week-View'
-version = '5.2.2'
-
-apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
+ext {
+ PUBLISH_ARTIFACT_ID = 'threetenabp'
+}
+
+apply from: "${rootProject.projectDir}/scripts/publish-mavencentral.gradle"
+
android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
@@ -25,7 +27,6 @@ dependencies {
implementation libraries.threeTenAbp
testImplementation libraries.threeTen
-
testImplementation testing.jUnit
testImplementation testing.mockitoCore
testImplementation testing.mockitoInline
diff --git a/threetenabp/consumer-rules.pro b/threetenabp/consumer-rules.pro
deleted file mode 100644
index e69de29bb..000000000
diff --git a/threetenabp/proguard-rules.pro b/threetenabp/proguard-rules.pro
deleted file mode 100644
index f1b424510..000000000
--- a/threetenabp/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile