Skip to content

Commit cd79f5c

Browse files
committed
feat: Update gradle version and publishing configuration
1 parent 2a04be5 commit cd79f5c

7 files changed

Lines changed: 77 additions & 51 deletions

File tree

RELEASING.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
Releasing
22
========
33

4-
1. Update the version in `gradle.properties`.
4+
1. Update the version in module `build.gradle` file.
55
2. Update the `CHANGELOG.md` for the impending release.
6-
3. Update the `README.md` with the new version.
6+
3. Update the `README.md` with the new version if needed.
77
4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
8-
5. `./gradlew clean uploadArchives`.
9-
6. Visit [Sonatype Nexus](https://s01.oss.sonatype.org/) and promote the artifact.
8+
5. `./gradlew publishAllPublicationsToMavenCentral`.
9+
6. `./gradlew closeAndReleaseRepository`.
1010
7. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version)
1111
8. Update the `gradle.properties` to the next SNAPSHOT version.
1212
9. `git commit -am "Prepare next development version."`
1313
10. `git push && git push --tags`
14-
15-
If step 5 or 6 fails, drop the Sonatype repo, fix the problem, commit, and start again at step 5.

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 33
5+
namespace 'com.amrdeveloper.codeviewlibrary'
56

67
defaultConfig {
78
applicationId "com.amrdeveloper.codeviewlibrary"

build.gradle

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
buildscript {
3-
repositories {
4-
google()
5-
jcenter()
6-
}
7-
dependencies {
8-
classpath "com.android.tools.build:gradle:4.0.1"
9-
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
12-
}
13-
}
14-
15-
allprojects {
16-
repositories {
17-
google()
18-
jcenter()
19-
}
20-
}
21-
22-
task clean(type: Delete) {
23-
delete rootProject.buildDir
1+
plugins {
2+
id 'com.android.application' version '8.1.1' apply false
3+
id 'com.android.library' version '8.1.1' apply false
4+
id 'com.vanniktech.maven.publish' version "0.25.3"
245
}

codeview/build.gradle

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
apply plugin: 'com.android.library'
1+
plugins {
2+
id 'com.android.library'
3+
id 'com.vanniktech.maven.publish'
4+
}
25

36
android {
47
compileSdkVersion 33
8+
namespace 'com.amrdeveloper.codeview'
59

610
defaultConfig {
711
minSdkVersion 15
812
targetSdkVersion 33
913
versionCode 15
10-
versionName "1.3.8"
14+
versionName "1.3.9"
1115

1216
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1317
consumerProguardFiles "consumer-rules.pro"
@@ -19,6 +23,15 @@ android {
1923
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2024
}
2125
}
26+
27+
compileOptions {
28+
sourceCompatibility JavaVersion.VERSION_1_8
29+
targetCompatibility JavaVersion.VERSION_1_8
30+
}
31+
32+
buildFeatures {
33+
buildConfig = false
34+
}
2235
}
2336

2437
dependencies {

gradle.properties

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,37 @@
1-
# Project-wide Gradle settings.
2-
# IDE (e.g. Android Studio) users:
3-
# Gradle settings configured through the IDE *will override*
4-
# any settings specified in this file.
5-
# For more details on how to configure your build environment visit
6-
# http://www.gradle.org/docs/current/userguide/build_environment.html
7-
# Specifies the JVM arguments used for the daemon process.
8-
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx2048m
10-
# When configured, Gradle will run in incubating parallel mode.
11-
# This option should only be used with decoupled projects. More details, visit
12-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13-
# org.gradle.parallel=true
14-
# AndroidX package structure to make it clearer which packages are bundled with the
15-
# Android operating system, and which are packaged with your app"s APK
16-
# https://developer.android.com/topic/libraries/support-library/androidx-rn
1+
android.nonTransitiveRClass=true
2+
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
173
android.useAndroidX=true
18-
# Automatically convert third-party libraries to use AndroidX
19-
android.enableJetifier=true
4+
android.enableJetifier=true
5+
6+
# Required to publish to Nexus
7+
systemProp.org.gradle.internal.publish.checksums.insecure=true
8+
9+
# Increase timeout when pushing to Sonatype
10+
systemProp.org.gradle.internal.http.connectionTimeout=120000
11+
systemProp.org.gradle.internal.http.socketTimeout=120000
12+
13+
GROUP=io.github.amrdeveloper
14+
VERSION_NAME=1.3.9
15+
16+
POM_DESCRIPTION=Android Library to make it easy to create a code editor
17+
POM_INCEPTION_YEAR=2023
18+
POM_URL=https://github.com/amrdeveloper/codeview/
19+
20+
POM_LICENSE_NAME=MIT
21+
POM_LICENSE_URL=https://opensource.org/licenses/MIT
22+
POM_LICENSE_DIST=repo
23+
24+
POM_SCM_URL=https://github.com/amrdeveloper/codeview/
25+
POM_SCM_CONNECTION=scm:git:git://github.com/amrdeveloper/codeview.git
26+
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/amrdeveloper/codeview.git
27+
28+
POM_DEVELOPER_ID=amrdeveloper
29+
POM_DEVELOPER_NAME=Amr Hesham
30+
POM_DEVELOPER_URL=https://github.com/amrdeveloper/
31+
32+
POM_ARTIFACT_ID=codeview
33+
POM_NAME=CodeView
34+
POM_PACKAGING=aar
35+
36+
SONATYPE_HOST=S01
37+
RELEASE_SIGNING_ENABLED=true

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https://services.gradle.org/distributions/gradle-6.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip

settings.gradle

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
pluginManagement {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
gradlePluginPortal()
6+
}
7+
}
8+
dependencyResolutionManagement {
9+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10+
repositories {
11+
google()
12+
mavenCentral()
13+
}
14+
}
15+
16+
rootProject.name = "CodeView"
117
include ':codeview'
218
include ':app'
3-
rootProject.name = "CodeView"

0 commit comments

Comments
 (0)