Skip to content

Commit 5b43681

Browse files
Added Android Studio resource and Android commandline tools (WIP). Fi… (#5)
* Added Android Studio resource and Android commandline tools (WIP). Fixed bugs with jenv resource. * Updated to draft07 for better json schema support * Updated to draft07 for better json schema support * Bumped plugin test library version * Added Android Studios version API (Jetbrains) + folder utils to help find applications using /Application and spotlight * Complete plan and create for downloading and validating Android studios * Removed installing commandline tools for now * Bug fix for version data * Bug fixes for the version matching
1 parent d6583ad commit 5b43681

29 files changed

Lines changed: 464 additions & 54 deletions

package-lock.json

Lines changed: 76 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"ajv": "^8.12.0",
2323
"ajv-formats": "^2.1.1",
2424
"semver": "^7.6.0",
25-
"codify-plugin-test": "0.0.5",
26-
"codify-plugin-lib": "1.0.75",
27-
"codify-schemas": "1.0.44",
25+
"codify-plugin-lib": "1.0.76",
26+
"codify-schemas": "1.0.45",
2827
"chalk": "^5.3.0",
29-
"debug": "^4.3.4"
28+
"debug": "^4.3.4",
29+
"plist": "^3.1.0"
3030
},
3131
"devDependencies": {
3232
"rollup": "^4.12.0",
@@ -42,6 +42,8 @@
4242
"@types/mock-fs": "^4.13.4",
4343
"@types/chalk": "^2.2.0",
4444
"@types/debug": "4.1.12",
45+
"@types/plist": "^3.0.5",
46+
"codify-plugin-test": "0.0.7",
4547
"eslint": "^8.51.0",
4648
"eslint-config-oclif": "^5",
4749
"eslint-config-oclif-typescript": "^3",

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Plugin, runPlugin } from 'codify-plugin-lib';
22

3+
import { AndroidStudioResource } from './resources/android/android-studio.js';
34
import { AwsCliResource } from './resources/aws-cli/cli/aws-cli.js';
45
import { AwsProfileResource } from './resources/aws-cli/profile/aws-profile.js';
56
import { GitCloneResource } from './resources/git/clone/git-clone.js';
@@ -34,5 +35,6 @@ runPlugin(Plugin.create(
3435
new PgcliResource(),
3536
new VscodeResource(),
3637
new GitCloneResource(),
38+
new AndroidStudioResource(),
3739
])
3840
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"$id": "https://www.codifycli.com/pgcli.json",
4+
"title": "Android studios resource",
5+
"type": "object",
6+
"properties": {
7+
"version": {
8+
"type": "string",
9+
"description": "Android studios version. Visit: https://developer.android.com/studio/releases for version info"
10+
},
11+
"directory": {
12+
13+
}
14+
},
15+
"additionalProperties": false
16+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { describe, it } from 'vitest';
2+
import { Utils } from '../../utils';
3+
import { AndroidStudioResource } from './android-studio';
4+
5+
describe('Android Studio unit tests', () => {
6+
it('Correctly parses the plist (this only works with an installed version of Android already)', async () => {
7+
const versions = await Utils.findApplication('Android Studio');
8+
const resource = new AndroidStudioResource()
9+
10+
const results = await Promise.all(
11+
versions.map((v) => resource.addPlistData(v))
12+
)
13+
14+
console.log(results);
15+
16+
})
17+
})

0 commit comments

Comments
 (0)