Skip to content

Commit

Permalink
Release 2.0.0 (#13)
Browse files Browse the repository at this point in the history
* Cap 6

* WIP

* WIP

* Android fixes

* SPM support
  • Loading branch information
rlepinski committed Jul 3, 2024
1 parent d7ec332 commit 8524f8e
Show file tree
Hide file tree
Showing 24 changed files with 1,942 additions and 10,305 deletions.
33 changes: 33 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
name: "UaCapacitorAirship",
platforms: [.iOS(.v14)],
products: [
.library(
name: "UaCapacitorAirship",
targets: ["UaCapacitorAirship"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "main"),
.package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "7.0.0")
],
targets: [
.target(
name: "UaCapacitorAirshipPlugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm"),
.product(name: "AirshipFrameworkProxy", package: "airship-mobile-framework-proxy")
],
path: "ios/Plugin"
),
.target(
name: "UaCapacitorAirship",
dependencies: [.target(name: "UaCapacitorAirshipPlugin")],
path: "ios/Bootloader",
publicHeadersPath: "Public"
)
]
)
14 changes: 12 additions & 2 deletions UaCapacitorAirship.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@ Pod::Spec.new do |s|
s.homepage = package['repository']['url']
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '14.0'
s.dependency 'Capacitor'
s.swift_version = '5.1'
s.dependency "AirshipFrameworkProxy", "6.3.1"
s.dependency "AirshipFrameworkProxy", "7.0.0"
s.default_subspecs = ["Bootloader", "Plugin"]


s.subspec "Bootloader" do |bootloader|
bootloader.source_files = 'ios/Bootloader/**/*.{swift,h,m,c,cc,mm,cpp}'
end


s.subspec "Plugin" do |plugin|
plugin.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
end
end
30 changes: 13 additions & 17 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
ext {
airshipProxyVersion = project.hasProperty('airshipProxyVersion') ? rootProject.ext.airshipProxyVersion : '7.0.0'
}


buildscript {
def kotlinVersion = project.hasProperty('kotlinVersion') ? rootProject.ext.kotlinVersion : '1.8.20'
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.10'

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

def isHmsEnabled() {
return (rootProject.hasProperty("airshipHmsEnabled") && rootProject.getProperty("airshipHmsEnabled") == "true") || (rootProject.ext.has("airshipHmsEnabled") && rootProject.ext.get("airshipHmsEnabled") == "true")
}

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["Airship_" + name]
}

apply plugin: 'com.android.library'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'kotlin-android'

android {
namespace "com.airship.capacitor"
Expand All @@ -46,7 +47,7 @@ android {
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
jvmTarget = JavaVersion.VERSION_17
}
}

Expand All @@ -56,17 +57,12 @@ repositories {
}

dependencies {
def proxyVersion = '6.3.0'
def airshipVersion = '17.8.1'
def kotlinVersion = project.hasProperty('kotlinVersion') ? rootProject.ext.kotlinVersion : '1.8.20'


implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':capacitor-android')
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
api "com.urbanairship.android:airship-framework-proxy:$proxyVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api "com.urbanairship.android:airship-framework-proxy:$airshipProxyVersion"

if (isHmsEnabled()) {
implementation "com.urbanairship.android:urbanairship-hms:$airshipVersion"
implementation "com.urbanairship.android:airship-framework-proxy-hms:$airshipProxyVersion"
}
}
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Loading

0 comments on commit 8524f8e

Please sign in to comment.