-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
911 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* eslint-disable */ | ||
export default { | ||
transform: { | ||
'^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }], | ||
}, | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'], | ||
maxWorkers: 1, | ||
globals: {}, | ||
globalSetup: '../utils/global-setup.ts', | ||
globalTeardown: '../utils/global-teardown.ts', | ||
displayName: 'e2e-gradle', | ||
testTimeout: 600000, | ||
preset: '../../jest.preset.js', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "e2e-gradle", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "e2e/gradle", | ||
"projectType": "application", | ||
"targets": { | ||
"e2e": {} | ||
}, | ||
"implicitDependencies": ["eslint"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { | ||
cleanupProject, | ||
createFile, | ||
e2eConsoleLogger, | ||
newProject, | ||
runCLI, | ||
runCommand, | ||
uniq, | ||
updateJson, | ||
} from '@nx/e2e/utils'; | ||
import { execSync } from 'child_process'; | ||
|
||
describe('Gradle', () => { | ||
let gradleProjectName = uniq('my-gradle-project'); | ||
|
||
beforeAll(() => { | ||
newProject(); | ||
createGradleProject(gradleProjectName); | ||
}); | ||
afterAll(() => cleanupProject()); | ||
|
||
it('should build', () => { | ||
const projects = runCLI(`show projects`); | ||
e2eConsoleLogger(projects); | ||
expect(projects).toContain('app'); | ||
expect(projects).toContain('list'); | ||
expect(projects).toContain('utilities'); | ||
expect(projects).toContain(gradleProjectName); | ||
|
||
runCLI('build app'); | ||
runCLI('build list'); | ||
runCLI('build utilities'); | ||
}); | ||
}); | ||
|
||
function createGradleProject(projectName: string) { | ||
e2eConsoleLogger(`Using java version: ${execSync('java --version')}`); | ||
e2eConsoleLogger(`Using gradle version: ${execSync('gradle --version')}`); | ||
e2eConsoleLogger(execSync(`gradle help --task :init`).toString()); | ||
e2eConsoleLogger( | ||
runCommand( | ||
`gradle init --type kotlin-application --dsl kotlin --project-name ${projectName} --package gradleProject --no-incubating --split-project` | ||
) | ||
); | ||
updateJson('nx.json', (nxJson) => { | ||
nxJson.plugins = ['@nx/gradle']; | ||
return nxJson; | ||
}); | ||
createFile( | ||
'build.gradle.kts', | ||
`allprojects { | ||
apply { | ||
plugin("project-report") | ||
} | ||
}` | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"types": ["node", "jest"] | ||
}, | ||
"include": [], | ||
"files": [], | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.spec.json" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../../dist/out-tsc", | ||
"module": "commonjs", | ||
"types": ["jest", "node"] | ||
}, | ||
"include": [ | ||
"**/*.test.ts", | ||
"**/*.spec.ts", | ||
"**/*.spec.tsx", | ||
"**/*.test.tsx", | ||
"**/*.spec.js", | ||
"**/*.test.js", | ||
"**/*.spec.jsx", | ||
"**/*.test.jsx", | ||
"**/*.d.ts", | ||
"jest.config.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.json"], | ||
"parser": "jsonc-eslint-parser", | ||
"rules": { | ||
"@nx/dependency-checks": [ | ||
"error", | ||
{ | ||
"ignoredDependencies": ["nx"] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["./package.json"], | ||
"parser": "jsonc-eslint-parser", | ||
"rules": { | ||
"@nx/nx-plugin-checks": "error" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p> | ||
|
||
{{links}} | ||
|
||
<hr> | ||
|
||
# Nx: Smart, Fast and Extensible Build System | ||
|
||
Nx is a next generation build system with first class monorepo support and powerful integrations. | ||
|
||
This package is a [Gradle plugin for Nx](https://nx.dev/js/overview). | ||
|
||
{{content}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './plugin'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* eslint-disable */ | ||
export default { | ||
transform: { | ||
'^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }], | ||
}, | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'], | ||
globals: {}, | ||
displayName: 'gradle', | ||
preset: '../../jest.preset.js', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"generators": {}, | ||
"packageJsonUpdates": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "@nx/gradle", | ||
"version": "0.0.1", | ||
"private": true, | ||
"description": "The Nx Plugin for gradle", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/nrwl/nx.git", | ||
"directory": "packages/gradle" | ||
}, | ||
"keywords": [ | ||
"Monorepo", | ||
"Java", | ||
"Gradle", | ||
"CLI" | ||
], | ||
"main": "./index", | ||
"typings": "./index.d.ts", | ||
"author": "Victor Savkin", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/nrwl/nx/issues" | ||
}, | ||
"homepage": "https://nx.dev", | ||
"ng-update": { | ||
"requirements": {}, | ||
"migrations": "./migrations.json" | ||
}, | ||
"dependencies": { | ||
"@nx/devkit": "file:../devkit" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { createDependencies } from './src/plugin/dependencies'; | ||
export { createNodes } from './src/plugin/nodes'; |
Oops, something went wrong.