Skip to content

Commit

Permalink
Update Android 12
Browse files Browse the repository at this point in the history
  • Loading branch information
ltrudu committed Oct 4, 2022
1 parent 5f6f678 commit efcf555
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 230 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.

8 changes: 3 additions & 5 deletions .idea/gradle.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.

9 changes: 9 additions & 0 deletions .idea/modules.xml

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

2 changes: 1 addition & 1 deletion EnterpriseServices/SampleHTML/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2>Responses</h2>
</div>

<script>
var destIP = "localhost";//"127.0.0.1"; //"10.10.12.179";//"10.6.201.11"; // IP address of the device. This can be localhost or 127.0.0.1 if run locally.
var destIP = "192.168.1.49";//"127.0.0.1"; //"10.10.12.179";//"10.6.201.11"; // IP address of the device. This can be localhost or 127.0.0.1 if run locally.
// destIP can be set to a remote IP if you want to test your web page code from a desktop computer
// in that case, you must enable the "allow external ip" option of the service

Expand Down
8 changes: 5 additions & 3 deletions EnterpriseServices/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 29
compileSdkVersion 32

defaultConfig {
applicationId "com.zebra.enterpriseservices"
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 32
versionCode 3
versionName "1.2"

Expand Down
20 changes: 15 additions & 5 deletions EnterpriseServices/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

<queries>
<package android:name="com.zebra.printconnect" />
<package android:name="com.symbol.datawedge" />
</queries>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand All @@ -18,7 +23,8 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.zebra.enterpriseservices.LicenceActivity"></activity>
<activity android:name="com.zebra.enterpriseservices.RESTHostServiceActivity">
<activity android:name="com.zebra.enterpriseservices.RESTHostServiceActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand All @@ -32,7 +38,8 @@
<receiver
android:name="com.zebra.enterpriseservices.RESTHostServiceBroadcastReceiverBootCompleted"
android:enabled="true"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
android:permission="android.permission.RECEIVE_BOOT_COMPLETED"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />

Expand All @@ -41,7 +48,8 @@
</receiver>
<receiver
android:name="com.zebra.enterpriseservices.RESTHostServiceBroadcastReceiverStart"
android:enabled="true">
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.zebra.enterpriseservices.startservice" />

Expand All @@ -50,7 +58,8 @@
</receiver>
<receiver
android:name="com.zebra.enterpriseservices.RESTHostServiceBroadcastReceiverStop"
android:enabled="true">
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.zebra.enterpriseservices.stopservice" />

Expand All @@ -59,7 +68,8 @@
</receiver>
<receiver
android:name="com.zebra.enterpriseservices.RESTHostServiceBroadcastReceiverSetup"
android:enabled="true">
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.zebra.enterpriseservices.setupservice" />

Expand Down
103 changes: 5 additions & 98 deletions PrintConnectIntentsWrapper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
}

ext {
PUBLISH_GROUP_ID = 'com.zebra.printconnectintentswrapper'
Expand All @@ -7,11 +9,11 @@ ext {
}

android {
compileSdkVersion 27
compileSdkVersion 32

defaultConfig {
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 32
versionCode 1
versionName "1.2"

Expand All @@ -35,99 +37,4 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

def jarName = 'datawedgeprofileintents.jar'

task clearJarRelease(type: Delete) {
delete "${project.buildDir}/outputs/jar/release/" + jarName
}

task clearJarDebug(type: Delete) {
delete "${project.buildDir}/outputs/jar/debug/" + jarName
}

task makeJarRelease(type: Copy) {
from("${project.buildDir}/intermediates/intermediate-jars/release/")
into("${project.buildDir}/outputs/jar/release")
include('classes.jar')
rename('classes.jar', jarName)
}

task makeJarDebug(type: Copy) {
from("${project.buildDir}/intermediates/intermediate-jars/debug/")
into("${project.buildDir}/outputs/jar/debug")
include('classes.jar')
rename('classes.jar', jarName)
}

task makeAllJar(type: Copy) {}

makeJarRelease.dependsOn(clearJarRelease, build)
makeJarDebug.dependsOn(clearJarDebug, build)

makeAllJar.dependsOn(makeJarDebug,makeJarRelease)

/*
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
}
29 changes: 12 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
kotlin_version = '1.6.10'
compose_version = '1.0.5'
}
repositories {
jcenter()
google()
//maven {
// url "https://dl.bintray.com/ltrudu/Zebra_Open_Source_Tools_And_Libraries"
//}
mavenCentral()
maven { url 'https://jitpack.io' }
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "com.android.tools.build:gradle:7.1.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
jcenter()
google()
//maven {
// url "https://dl.bintray.com/ltrudu/Zebra_Open_Source_Tools_And_Libraries"
//}
}
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) {
Expand Down
Loading

0 comments on commit efcf555

Please sign in to comment.