Skip to content

Commit

Permalink
Multiplatform: Add iOS target.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed Jun 27, 2023
1 parent 7385cbe commit 5cec778
Show file tree
Hide file tree
Showing 31 changed files with 513 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = 'emoji_facebook'
spec.name = 'EmojiFacebook'
spec.version = '0.18.0-SNAPSHOT'
spec.homepage = ''
spec.homepage = 'https://github.com/vanniktech/Emoji'
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.summary = ''
spec.summary = 'emoji-facebook'
spec.vendored_frameworks = 'build/cocoapods/framework/emoji_facebook.framework'
spec.libraries = 'c++'

Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |spec|

spec.script_phases = [
{
:name => 'Build emoji_facebook',
:name => 'Build EmojiFacebook',
:execution_position => :before_compile,
:shell_path => '/bin/sh',
:script => <<-SCRIPT
Expand Down
23 changes: 21 additions & 2 deletions emoji-facebook/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ licensee {

metalava {
filename.set("api/current.txt")
sourcePaths.setFrom("src/commonMain", "src/androidMain", "src/jvmMain")
sourcePaths.setFrom("src/commonMain", "src/androidMain", "src/jvmMain", "src/iosMain")
}

// CocoaPods requires a version.
Expand All @@ -25,12 +25,25 @@ kotlin {
android("android") {
publishLibraryVariants("release")
}
// ios("ios")
ios("ios")
jvm("jvm")
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}

cocoapods {
version = VERSION_NAME
summary = "emoji-facebook"
homepage = "https://github.com/vanniktech/Emoji"
name = "EmojiFacebook"

// framework {
// isStatic = true
// embedBitcode(BITCODE)
// export(project(":emoji"))
// }
}

sourceSets {
commonMain {
dependencies {
Expand All @@ -53,6 +66,12 @@ kotlin {
implementation libs.robolectric
}

iosMain.dependencies {
}

iosTest.dependencies {
}

jvmMain.dependencies {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2016 - Niklas Baudy, Ruben Gees, Mario Đanić and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.vanniktech.emoji.facebook

import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.EmojiProvider
import com.vanniktech.emoji.facebook.category.ActivitiesCategory
import com.vanniktech.emoji.facebook.category.AnimalsAndNatureCategory
import com.vanniktech.emoji.facebook.category.FlagsCategory
import com.vanniktech.emoji.facebook.category.FoodAndDrinkCategory
import com.vanniktech.emoji.facebook.category.ObjectsCategory
import com.vanniktech.emoji.facebook.category.SmileysAndPeopleCategory
import com.vanniktech.emoji.facebook.category.SymbolsCategory
import com.vanniktech.emoji.facebook.category.TravelAndPlacesCategory

class FacebookEmojiProvider : EmojiProvider {
override val categories: Array<EmojiCategory>
get() = arrayOf(
SmileysAndPeopleCategory(),
AnimalsAndNatureCategory(),
FoodAndDrinkCategory(),
ActivitiesCategory(),
TravelAndPlacesCategory(),
ObjectsCategory(),
SymbolsCategory(),
FlagsCategory(),
)

override fun release() = Unit
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = 'emoji_google_compat'
spec.name = 'EmojiGoogleCompat'
spec.version = '0.18.0-SNAPSHOT'
spec.homepage = ''
spec.homepage = 'https://github.com/vanniktech/Emoji'
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.summary = ''
spec.summary = 'emoji-google-compat'
spec.vendored_frameworks = 'build/cocoapods/framework/emoji_google_compat.framework'
spec.libraries = 'c++'

Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |spec|

spec.script_phases = [
{
:name => 'Build emoji_google_compat',
:name => 'Build EmojiGoogleCompat',
:execution_position => :before_compile,
:shell_path => '/bin/sh',
:script => <<-SCRIPT
Expand Down
23 changes: 21 additions & 2 deletions emoji-google-compat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ licensee {

metalava {
filename.set("api/current.txt")
sourcePaths.setFrom("src/commonMain", "src/androidMain", "src/jvmMain")
sourcePaths.setFrom("src/commonMain", "src/androidMain", "src/jvmMain", "src/iosMain")
}

// CocoaPods requires a version.
Expand All @@ -25,12 +25,25 @@ kotlin {
android("android") {
publishLibraryVariants("release")
}
// ios("ios")
ios("ios")
jvm("jvm")
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}

cocoapods {
version = VERSION_NAME
summary = "emoji-google-compat"
homepage = "https://github.com/vanniktech/Emoji"
name = "EmojiGoogleCompat"

// framework {
// isStatic = true
// embedBitcode(BITCODE)
// export(project(":emoji"))
// }
}

sourceSets {
commonMain {
dependencies {
Expand All @@ -54,6 +67,12 @@ kotlin {
implementation libs.robolectric
}

iosMain.dependencies {
}

iosTest.dependencies {
}

jvmMain.dependencies {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2016 - Niklas Baudy, Ruben Gees, Mario Đanić and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.vanniktech.emoji.googlecompat

import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.EmojiProvider
import com.vanniktech.emoji.googlecompat.category.ActivitiesCategory
import com.vanniktech.emoji.googlecompat.category.AnimalsAndNatureCategory
import com.vanniktech.emoji.googlecompat.category.FlagsCategory
import com.vanniktech.emoji.googlecompat.category.FoodAndDrinkCategory
import com.vanniktech.emoji.googlecompat.category.ObjectsCategory
import com.vanniktech.emoji.googlecompat.category.SmileysAndPeopleCategory
import com.vanniktech.emoji.googlecompat.category.SymbolsCategory
import com.vanniktech.emoji.googlecompat.category.TravelAndPlacesCategory

class GoogleCompatEmojiProvider : EmojiProvider {
override val categories: Array<EmojiCategory>
get() = arrayOf(
SmileysAndPeopleCategory(),
AnimalsAndNatureCategory(),
FoodAndDrinkCategory(),
ActivitiesCategory(),
TravelAndPlacesCategory(),
ObjectsCategory(),
SymbolsCategory(),
FlagsCategory(),
)

override fun release() = Unit
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = 'emoji_google'
spec.name = 'EmojiGoogle'
spec.version = '0.18.0-SNAPSHOT'
spec.homepage = ''
spec.homepage = 'https://github.com/vanniktech/Emoji'
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.summary = ''
spec.summary = 'emoji-google'
spec.vendored_frameworks = 'build/cocoapods/framework/emoji_google.framework'
spec.libraries = 'c++'

Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |spec|

spec.script_phases = [
{
:name => 'Build emoji_google',
:name => 'Build EmojiGoogle',
:execution_position => :before_compile,
:shell_path => '/bin/sh',
:script => <<-SCRIPT
Expand Down
23 changes: 21 additions & 2 deletions emoji-google/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ licensee {

metalava {
filename.set("api/current.txt")
sourcePaths.setFrom("src/commonMain", "src/androidMain", "src/jvmMain")
sourcePaths.setFrom("src/commonMain", "src/androidMain", "src/jvmMain", "src/iosMain")
}

// CocoaPods requires a version.
Expand All @@ -25,12 +25,25 @@ kotlin {
android("android") {
publishLibraryVariants("release")
}
// ios("ios")
ios("ios")
jvm("jvm")
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}

cocoapods {
version = VERSION_NAME
summary = "emoji-google"
homepage = "https://github.com/vanniktech/Emoji"
name = "EmojiGoogle"

// framework {
// isStatic = true
// embedBitcode(BITCODE)
// export(project(":emoji"))
// }
}

sourceSets {
commonMain {
dependencies {
Expand All @@ -53,6 +66,12 @@ kotlin {
implementation libs.robolectric
}

iosMain.dependencies {
}

iosTest.dependencies {
}

jvmMain.dependencies {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2016 - Niklas Baudy, Ruben Gees, Mario Đanić and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.vanniktech.emoji.google

import com.vanniktech.emoji.EmojiCategory
import com.vanniktech.emoji.EmojiProvider
import com.vanniktech.emoji.google.category.ActivitiesCategory
import com.vanniktech.emoji.google.category.AnimalsAndNatureCategory
import com.vanniktech.emoji.google.category.FlagsCategory
import com.vanniktech.emoji.google.category.FoodAndDrinkCategory
import com.vanniktech.emoji.google.category.ObjectsCategory
import com.vanniktech.emoji.google.category.SmileysAndPeopleCategory
import com.vanniktech.emoji.google.category.SymbolsCategory
import com.vanniktech.emoji.google.category.TravelAndPlacesCategory

class GoogleEmojiProvider : EmojiProvider {
override val categories: Array<EmojiCategory>
get() = arrayOf(
SmileysAndPeopleCategory(),
AnimalsAndNatureCategory(),
FoodAndDrinkCategory(),
ActivitiesCategory(),
TravelAndPlacesCategory(),
ObjectsCategory(),
SymbolsCategory(),
FlagsCategory(),
)

override fun release() = Unit
}
8 changes: 4 additions & 4 deletions emoji-ios/emoji_ios.podspec → emoji-ios/EmojiIos.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = 'emoji_ios'
spec.name = 'EmojiIos'
spec.version = '0.18.0-SNAPSHOT'
spec.homepage = ''
spec.homepage = 'https://github.com/vanniktech/Emoji'
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.summary = ''
spec.summary = 'emoji-ios'
spec.vendored_frameworks = 'build/cocoapods/framework/emoji_ios.framework'
spec.libraries = 'c++'

Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |spec|

spec.script_phases = [
{
:name => 'Build emoji_ios',
:name => 'Build EmojiIos',
:execution_position => :before_compile,
:shell_path => '/bin/sh',
:script => <<-SCRIPT
Expand Down
Loading

0 comments on commit 5cec778

Please sign in to comment.