Skip to content

Commit

Permalink
feat: Update gradle version and publishing configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed Dec 30, 2023
1 parent 2a04be5 commit cd79f5c
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 51 deletions.
10 changes: 4 additions & 6 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
Releasing
========

1. Update the version in `gradle.properties`.
1. Update the version in module `build.gradle` file.
2. Update the `CHANGELOG.md` for the impending release.
3. Update the `README.md` with the new version.
3. Update the `README.md` with the new version if needed.
4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
5. `./gradlew clean uploadArchives`.
6. Visit [Sonatype Nexus](https://s01.oss.sonatype.org/) and promote the artifact.
5. `./gradlew publishAllPublicationsToMavenCentral`.
6. `./gradlew closeAndReleaseRepository`.
7. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version)
8. Update the `gradle.properties` to the next SNAPSHOT version.
9. `git commit -am "Prepare next development version."`
10. `git push && git push --tags`

If step 5 or 6 fails, drop the Sonatype repo, fix the problem, commit, and start again at step 5.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 33
namespace 'com.amrdeveloper.codeviewlibrary'

defaultConfig {
applicationId "com.amrdeveloper.codeviewlibrary"
Expand Down
27 changes: 4 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
plugins {
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
id 'com.vanniktech.maven.publish' version "0.25.3"
}
17 changes: 15 additions & 2 deletions codeview/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
id 'com.vanniktech.maven.publish'
}

android {
compileSdkVersion 33
namespace 'com.amrdeveloper.codeview'

defaultConfig {
minSdkVersion 15
targetSdkVersion 33
versionCode 15
versionName "1.3.8"
versionName "1.3.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -19,6 +23,15 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildFeatures {
buildConfig = false
}
}

dependencies {
Expand Down
54 changes: 36 additions & 18 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.nonTransitiveRClass=true
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=true

# Required to publish to Nexus
systemProp.org.gradle.internal.publish.checksums.insecure=true

# Increase timeout when pushing to Sonatype
systemProp.org.gradle.internal.http.connectionTimeout=120000
systemProp.org.gradle.internal.http.socketTimeout=120000

GROUP=io.github.amrdeveloper
VERSION_NAME=1.3.9

POM_DESCRIPTION=Android Library to make it easy to create a code editor
POM_INCEPTION_YEAR=2023
POM_URL=https://github.com/amrdeveloper/codeview/

POM_LICENSE_NAME=MIT
POM_LICENSE_URL=https://opensource.org/licenses/MIT
POM_LICENSE_DIST=repo

POM_SCM_URL=https://github.com/amrdeveloper/codeview/
POM_SCM_CONNECTION=scm:git:git://github.com/amrdeveloper/codeview.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/amrdeveloper/codeview.git

POM_DEVELOPER_ID=amrdeveloper
POM_DEVELOPER_NAME=Amr Hesham
POM_DEVELOPER_URL=https://github.com/amrdeveloper/

POM_ARTIFACT_ID=codeview
POM_NAME=CodeView
POM_PACKAGING=aar

SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
17 changes: 16 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "CodeView"
include ':codeview'
include ':app'
rootProject.name = "CodeView"

0 comments on commit cd79f5c

Please sign in to comment.