diff --git a/RELEASING.md b/RELEASING.md index 7ceeb75..7bd1ce4 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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. \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index e638336..2924aeb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 33 + namespace 'com.amrdeveloper.codeviewlibrary' defaultConfig { applicationId "com.amrdeveloper.codeviewlibrary" diff --git a/build.gradle b/build.gradle index 6754c23..84c9c55 100644 --- a/build.gradle +++ b/build.gradle @@ -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" } \ No newline at end of file diff --git a/codeview/build.gradle b/codeview/build.gradle index 416b240..4b5148c 100644 --- a/codeview/build.gradle +++ b/codeview/build.gradle @@ -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" @@ -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 { diff --git a/gradle.properties b/gradle.properties index c52ac9b..b19ba70 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file +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://git@github.com/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 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dc45ec2..ef1750d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index da58ab8..a77cc7e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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" \ No newline at end of file