Skip to content
Merged
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
100 changes: 0 additions & 100 deletions migrations.json

This file was deleted.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
},
"private": true,
"devDependencies": {
"@angular/core": "~14.2.0",
"@nrwl/angular": "15.1.1",
"@nrwl/cli": "15.1.1",
"@nrwl/eslint-plugin-nx": "15.1.1",
"@nrwl/jest": "15.1.1",
"@nrwl/nx-plugin": "15.1.1",
"@nrwl/workspace": "15.1.1",
"@angular/core": "15.0.4",
"@nrwl/angular": "15.3.3",
"@nrwl/cli": "15.3.3",
"@nrwl/eslint-plugin-nx": "15.3.3",
"@nrwl/jest": "15.3.3",
"@nrwl/nx-plugin": "15.3.3",
"@nrwl/workspace": "15.3.3",
"@swc-node/register": "^1.4.2",
"@swc/core": "^1.2.173",
"@types/fs-extra": "^9.0.11",
Expand All @@ -56,7 +56,7 @@
"fs-extra": "^10.1.0",
"jest": "28.1.3",
"jsonc-parser": "3.0.0",
"nx": "15.1.1",
"nx": "15.3.3",
"plist": "^3.0.4",
"prettier": "^2.7.0",
"ts-jest": "28.0.8",
Expand Down
4 changes: 2 additions & 2 deletions packages/nx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ yarn create-nx-workspace@latest
If you run into any issue with latest Nx workspace version you may want to try the last known stable version with the following:

```sh
npx create-nx-workspace@15.1.1
npx create-nx-workspace@15.3.3

Need to install the following packages:
create-nx-workspace@15.1.1
create-nx-workspace@15.3.3
Ok to proceed? (y) y

> NX Let's create a new workspace [https://nx.dev/getting-started/intro]
Expand Down
7 changes: 4 additions & 3 deletions packages/nx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
"migrations": "./migrations.json"
},
"dependencies": {
"@angular-devkit/architect": "^0.1400.0",
"@angular-devkit/core": "^14.0.0",
"@angular-devkit/schematics": "^14.0.0",
"@angular-devkit/architect": "^0.1500.0",
"@angular-devkit/core": "^15.0.0",
"@angular-devkit/schematics": "^15.0.0",
"@nrwl/devkit": "^15.0.0",
"fs-extra": "^10.1.0",
"ignore": "^5.0.4",
"jsonc-parser": "3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
// Add your native dependencies here:

// Uncomment to add recyclerview-v7 dependency
//dependencies {
// implementation 'com.android.support:recyclerview-v7:+'
//}

// If you want to add something to be applied before applying plugins' include.gradle files
// e.g. project.ext.googlePlayServicesVersion = "15.0.1"
// create a file named before-plugins.gradle in the current directory and place it there
// You can add your native dependencies here
dependencies {
// implementation 'androidx.multidex:multidex:2.0.1'
}

android {
// compileSdkVersion 32
// buildToolsVersion "32.0.0"
// ndkVersion ""

defaultConfig {
minSdkVersion 17
minSdkVersion 21
// targetSdkVersion 32

// Version Information
versionCode 1
versionName "1.0.0"

generatedDensities = []
}

aaptOptions {
additionalParameters "--no-version-vectors"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// this configurations is loaded before building plugins, as well as before building
// the app - this is where you can apply global settings and overrides

project.ext {
// androidXAppCompat = "1.4.1"
// androidXExifInterface = "1.3.3"
// androidXFragment = "1.4.1"
// androidXMaterial = "1.5.0"
// androidXMultidex = "2.0.1"
// androidXTransition = "1.4.1"
// androidXViewPager = "1.0.0"

// useKotlin = true
// kotlinVersion = "1.6.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:hardwareAccelerated="true">

<activity
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
android:theme="@style/LaunchScreenTheme">
android:theme="@style/LaunchScreenTheme"
android:hardwareAccelerated="true"
android:launchMode="singleTask"
android:exported="true">

<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />

Expand Down
12 changes: 6 additions & 6 deletions packages/nx/src/generators/application/application.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readJson, Tree, updateJson, addProjectConfiguration, generateFiles, joinPathFragments, installPackagesTask } from '@nrwl/devkit';
import { Tree, addProjectConfiguration, generateFiles, joinPathFragments, installPackagesTask } from '@nrwl/devkit';
import { getAppName, getDefaultTemplateOptions, getFrontendFramework, getPrefix, missingArgument, PluginHelpers, prerun, updateNxProjects, updatePackageScripts } from '../../utils';
import { angularVersion, nsAngularVersion, nsWebpackVersion, nsNgToolsVersion, nsCoreVersion, typescriptVersion, rxjsVersion, zonejsVersion, nsIOSRuntimeVersion, nsAndroidRuntimeVersion } from '../../utils/versions';
import { appResources } from '../app-resources/app-resources';
Expand Down Expand Up @@ -31,7 +31,7 @@ export async function applicationGenerator(tree: Tree, options: Schema) {
case 'angular':
frontendFrameworkConfig = {
build: {
builder: '@nativescript/nx:build',
executor: '@nativescript/nx:build',
options: {
noHmr: true,
production: true,
Expand Down Expand Up @@ -60,7 +60,7 @@ export async function applicationGenerator(tree: Tree, options: Schema) {
targets: {
...frontendFrameworkConfig,
ios: {
builder: '@nativescript/nx:build',
executor: '@nativescript/nx:build',
options: {
platform: 'ios',
},
Expand All @@ -74,7 +74,7 @@ export async function applicationGenerator(tree: Tree, options: Schema) {
},
},
android: {
builder: '@nativescript/nx:build',
executor: '@nativescript/nx:build',
options: {
platform: 'android',
},
Expand All @@ -88,13 +88,13 @@ export async function applicationGenerator(tree: Tree, options: Schema) {
},
},
clean: {
builder: '@nativescript/nx:build',
executor: '@nativescript/nx:build',
options: {
clean: true,
},
},
lint: {
builder: '@nrwl/linter:eslint',
executor: '@nrwl/linter:eslint',
options: {
lintFilePatterns: [`${appPath}/**/*.ts`, `${appPath}/src/**/*.html`],
},
Expand Down
9 changes: 0 additions & 9 deletions packages/nx/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ export async function init(tree: Tree, options: Schema) {

return json;
});
const config = readWorkspaceConfiguration(tree);
if (!config.cli?.defaultCollection) {
updateWorkspaceConfiguration(tree, {
version: 2,
cli: {
defaultCollection: '@nativescript/nx'
}
});
}
}

export default init;
48 changes: 24 additions & 24 deletions packages/nx/src/generators/library/library.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import { generateFiles, joinPathFragments, Tree } from '@nrwl/devkit';
import { getDefaultTemplateOptions, getJsonFromFile, PluginHelpers, prerun, updateJsonFile } from '../../utils';
import { generateFiles, joinPathFragments, Tree, readJson } from '@nrwl/devkit';
import { getDefaultTemplateOptions, PluginHelpers, prerun, updateJsonFile } from '../../utils';
import { libraryGenerator } from '@nrwl/workspace';

export function library(tree: Tree, options: any) {
prerun(tree, options, true);
PluginHelpers.applyAppNamingConvention(tree, options, 'nativescript');
libraryGenerator(tree, options);

prerun(tree, options, true);
PluginHelpers.applyAppNamingConvention(tree, options, 'nativescript'),
libraryGenerator(tree, options)
console.log(tree.children('libs'));

// add extra files
const directory = options.directory ? `${options.directory}/` : '';
generateFiles(tree, joinPathFragments(__dirname, 'files'), `libs/${directory}${options.name}`, {
...(options as any),
...getDefaultTemplateOptions(),
pathOffset: directory ? '../../../' : '../../',
})
// add extra files
const directory = options.directory ? `${options.directory}/` : '';
generateFiles(tree, joinPathFragments(__dirname, 'files'), `libs/${directory}${options.name}`, {
...(options as any),
...getDefaultTemplateOptions(),
pathOffset: directory ? '../../../' : '../../',
});

// update library tsconfig for {N} development
const tsConfigPath = `libs/${directory}${options.name}/tsconfig.json`;
const tsConfigJson = getJsonFromFile(tree, tsConfigPath);
if (tsConfigJson && tsConfigJson.files) {
tsConfigJson.files.push('./references.d.ts');
}
if (tsConfigJson && tsConfigJson.include) {
tsConfigJson.include.push('**/*.ts');
}
updateJsonFile(tree, tsConfigPath, tsConfigJson);

// update library tsconfig for {N} development
const tsConfigPath = `libs/${directory}${options.name}/tsconfig.json`;
const tsConfigJson = readJson(tree, tsConfigPath);
if (tsConfigJson && tsConfigJson.files) {
tsConfigJson.files.push('./references.d.ts');
}
if (tsConfigJson && tsConfigJson.include) {
tsConfigJson.include.push('**/*.ts');
}
updateJsonFile(tree, tsConfigPath, tsConfigJson);
}

export default library;
export default library;
Loading