Skip to content

Commit

Permalink
Update Graddle
Browse files Browse the repository at this point in the history
  • Loading branch information
ltrudu committed Sep 21, 2022
1 parent 27ab553 commit f234cab
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 9 additions & 60 deletions PrintWrapper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
apply plugin: 'com.android.library'
//apply plugin: 'com.android.library'

plugins {
id 'com.android.library'
}

ext {
PUBLISH_GROUP_ID = 'com.zebra.printwrapper'
Expand All @@ -8,7 +12,6 @@ ext {

android {
compileSdkVersion 32
buildToolsVersion "29.0.3"

defaultConfig {
minSdkVersion 25
Expand All @@ -26,6 +29,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
Expand Down Expand Up @@ -74,61 +81,3 @@ Publish tasks
https://medium.com/@daniellevass/how-to-publish-your-android-studio-library-to-jcenter-5384172c4739
https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle
*/

// ./gradlew clean build generateRelease
apply plugin: 'maven'

def groupId = project.PUBLISH_GROUP_ID
def artifactId = project.PUBLISH_ARTIFACT_ID
def version = project.PUBLISH_VERSION

def localReleaseDest = "${buildDir}/release/${version}"

task androidJavadocs(type: Javadoc) {
failOnError = false
source = android.sourceSets.main.java.srcDirs
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath += files(ext.androidJar)
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

uploadArchives {
repositories.mavenDeployer {
pom.groupId = groupId
pom.artifactId = artifactId
pom.version = version
// Add other pom properties here if you want (developer details / licenses)
repository(url: "file://${localReleaseDest}")
}
}

task zipRelease(type: Zip) {
from localReleaseDest
destinationDir buildDir
archiveName "release-${version}.zip"
}

task generateRelease {
doLast {
println "Release ${version} can be found at ${localReleaseDest}/"
println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip"
}
}

generateRelease.dependsOn(uploadArchives)
generateRelease.dependsOn(zipRelease)


artifacts {
archives androidSourcesJar
archives androidJavadocsJar
}
2 changes: 0 additions & 2 deletions PrintWrapper/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zebra.printwrapper">

/
</manifest>
23 changes: 4 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
// 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.0"

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

allprojects {
repositories {
google()
jcenter()
}
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
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.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
16 changes: 16 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

include ':PrintWrapper'
rootProject.name = "PrintWrapper"

0 comments on commit f234cab

Please sign in to comment.