Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ns7 upgrade #15

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/publishing.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Publishing

## Android
## Prepare

Run:

```bash
ns clean
```

### Android

Running `ns build android` will create an Android project under `platforms/android`. This project
can be opened in Android Studio and published in the Play Store [like any other Android app](http://developer.android.com/tools/publishing/publishing_overview.html).

You can also find more information on building a signed release `.apk` [here](https://docs.nativescript.org/tooling/publishing/publishing-android-apps).

## iOS
### iOS

Running `ns prepare ios --release` will generate an Xcode project at `/platforms/ios/kiwiirc-app.xcworkspace`. You can open this project on Xcode and publish it [like any other iOS app](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html).

Expand Down
8 changes: 6 additions & 2 deletions kiwiirc-app/.env.default.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ PACKAGE_NAME="??"

# match and Matchfile
GIT_URL="??"
APP_IDENTIFIER="??"
USERNAME="??"

MATCH_PASSWORD="??"

# Appstore connect api
# see https://docs.fastlane.tools/app-store-connect-api
KEY_ID="??"
ISSUER_ID="??"
KEY_FILEPATH="??"

# Testflight info

# list of groups separated by space (e.g. "group1 group2")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__" android:versionCode="10000" android:versionName="1.0.0">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="__APILEVEL__" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="false" />
<uses-sdk android:targetSdkVersion="__APILEVEL__" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:label="@string/app_name" android:theme="@style/AppTheme">
<activity android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:configChanges="keyboardHidden|orientation|screenSize" android:theme="@style/LaunchScreenTheme">
<activity android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation|screenSize" android:theme="@style/LaunchScreenTheme">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
9 changes: 0 additions & 9 deletions kiwiirc-app/app/package.json

This file was deleted.

8 changes: 8 additions & 0 deletions kiwiirc-app/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ platform :ios do
beta_groups = ENV["BETA_GROUPS"].split(' ');
print_version_type

app_store_connect_api_key(
key_id: ENV["KEY_ID"],
issuer_id: ENV["ISSUER_ID"],
key_filepath: Dir.pwd + ENV["KEY_FILEPATH"],
duration: 3600,
in_house: false,
)

build

upload_to_testflight(
Expand Down
14 changes: 12 additions & 2 deletions kiwiirc-app/kiwi-custom.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require('fs');
const fse = require('fs-extra');

const webpack = require('webpack');
const nsWebpack = require('nativescript-dev-webpack');
const nsWebpack = require('@nativescript/webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

const packageJson = require('./package.json');
Expand Down Expand Up @@ -81,6 +81,16 @@ module.exports = (env) => {
loader: 'null-loader',
});

// remove CleanWebpackPlugin because it is wrongly removing assets/ from the
// platforms folder.
// Probably a bug, probably will be fixed with the webpack 5 upgrade.
const indexOfCleanWebpackPlugin = config.plugins.findIndex(
p => p.constructor.name === 'CleanWebpackPlugin'
);
if (indexOfCleanWebpackPlugin !== -1) {
config.plugins.splice(indexOfCleanWebpackPlugin, 1);
}

// config.plugins
config.plugins.push(
// fix irc framework import
Expand All @@ -96,7 +106,7 @@ module.exports = (env) => {
'process.version': "''",
'window.console': 'console',
}),
new webpack.IgnorePlugin({resourceRegExp: /assets\/plugins/}),
new webpack.IgnorePlugin({ resourceRegExp: /assets\/plugins/ }),
);

// copy kiwiirc-mobile assets and fonts
Expand Down
12 changes: 12 additions & 0 deletions kiwiirc-app/nativescript.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NativeScriptConfig } from '@nativescript/core'

export default {
id: 'com.example.kiwiircapp',
appResourcesPath: 'app/App_Resources',
android: {
v8Flags: '--expose_gc',
markingMode: 'none',
},
webpackConfigPath: './kiwi-custom.webpack.config.js',
appPath: 'app',
} as NativeScriptConfig
3 changes: 0 additions & 3 deletions kiwiirc-app/nsconfig.json

This file was deleted.

41 changes: 11 additions & 30 deletions kiwiirc-app/package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,35 @@
{
"name": "kiwiirc-app",
"main": "main.js",
"version": "1.0.0",
"versionNumber": "1",
"description": "Kiwi IRC mobile client",
"nativescript": {
"tns-android": {
"version": "6.5.3"
},
"tns-ios": {
"version": "6.5.3"
},
"id": "com.example.kiwiircapp"
},
"dependencies": {
"@nativescript/core": "~6.5.20",
"json5": "^2.1.3",
"kiwiirc": "../kiwiirc",
"@nativescript/core": "~7.1.2",
"kiwiirc-mobile": "../",
"nativescript-dev-version": "git+https://github.com/tralves/nativescript-dev-version.git",
"nativescript-vue": "~2.7.0"
"nativescript-dev-version": "git+https://github.com/tralves/nativescript-dev-version.git#ns7-update",
"nativescript-vue": "~2.8.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.0.0",
"@nativescript/android": "7.0.1",
"@nativescript/ios": "~7.0.0",
"@nativescript/types": "7.0.0",
"@nativescript/webpack": "~4.0.0",
"babel-loader": "^8.0.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"clean-webpack-plugin": "^0.1.19",
"commander": "^5.0.0",
"copy-webpack-plugin": "^4.5.2",
"css-loader": "^1.0.0",
"deepmerge": "^4.2.2",
"fs-extra": "^7.0.0",
"lazy": "1.0.11",
"nativescript-dev-webpack": "^1.1.1",
"nativescript-vue-template-compiler": "~2.7.0",
"nativescript-worker-loader": "~0.9.0",
"nativescript-vue-template-compiler": "2.8.0",
"node-sass": "^4.9.2",
"null-loader": "^0.1.1",
"sass-loader": "^7.1.0",
"terser-webpack-plugin": "^1.1.0",
"tns-android": "6.5.3",
"tns-ios": "6.5.3",
"tns-platform-declarations": "~6.5.1",
"typescript": "^3.5.3",
"vue-loader": "^15.2.6",
"webpack": "^4.16.4",
"webpack-bundle-analyzer": "~2.13.1",
"webpack-cli": "^3.1.0"
"vue-loader": "15.9.3"
}
}
}
Loading